Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
699b6a02
Commit
699b6a02
authored
Dec 20, 2021
by
orozot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit test to ensure importable_repos return an array
parent
677873e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
spec/controllers/import/gitlab_controller_spec.rb
spec/controllers/import/gitlab_controller_spec.rb
+8
-0
No files found.
spec/controllers/import/gitlab_controller_spec.rb
View file @
699b6a02
...
...
@@ -30,6 +30,14 @@ RSpec.describe Import::GitlabController do
expect
(
session
[
:gitlab_access_token
]).
to
eq
(
token
)
expect
(
controller
).
to
redirect_to
(
status_import_gitlab_url
)
end
it
"importable_repos should return an array"
do
allow_next_instance_of
(
Gitlab
::
GitlabImport
::
Client
)
do
|
instance
|
allow
(
instance
).
to
receive
(
:projects
).
and_return
([{
"id"
:
1
}].
to_enum
)
end
expect
(
controller
.
send
(
:importable_repos
)).
to
be_an_instance_of
(
Array
)
end
end
describe
"GET status"
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment