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
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
2d5765bd
Commit
2d5765bd
authored
Feb 03, 2015
by
Valery Sizov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gitlab.com importer: fix specs after refactoring
parent
93585661
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
spec/controllers/import/github_controller_spec.rb
spec/controllers/import/github_controller_spec.rb
+2
-2
No files found.
spec/controllers/import/github_controller_spec.rb
View file @
2d5765bd
...
@@ -10,7 +10,7 @@ describe Import::GithubController do
...
@@ -10,7 +10,7 @@ describe Import::GithubController do
describe
"GET callback"
do
describe
"GET callback"
do
it
"updates access token"
do
it
"updates access token"
do
token
=
"asdasd12345"
token
=
"asdasd12345"
Gitlab
::
Github
::
Client
.
any_instance
.
stub_chain
(
:client
,
:auth_code
,
:get_token
,
:token
).
and_return
(
token
)
Gitlab
::
Github
Import
::
Client
.
any_instance
.
stub_chain
(
:client
,
:auth_code
,
:get_token
,
:token
).
and_return
(
token
)
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"github"
)
Gitlab
.
config
.
omniauth
.
providers
<<
OpenStruct
.
new
(
app_id:
"asd123"
,
app_secret:
"asd123"
,
name:
"github"
)
get
:callback
get
:callback
...
@@ -55,7 +55,7 @@ describe Import::GithubController do
...
@@ -55,7 +55,7 @@ describe Import::GithubController do
it
"takes already existing namespace"
do
it
"takes already existing namespace"
do
namespace
=
create
(
:namespace
,
name:
"john"
,
owner:
user
)
namespace
=
create
(
:namespace
,
name:
"john"
,
owner:
user
)
Gitlab
::
Github
::
ProjectCreator
.
should_receive
(
:new
).
with
(
@repo
,
namespace
,
user
).
Gitlab
::
Github
Import
::
ProjectCreator
.
should_receive
(
:new
).
with
(
@repo
,
namespace
,
user
).
and_return
(
double
(
execute:
true
))
and_return
(
double
(
execute:
true
))
controller
.
stub_chain
(
:octo_client
,
:repo
).
and_return
(
@repo
)
controller
.
stub_chain
(
:octo_client
,
:repo
).
and_return
(
@repo
)
...
...
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