diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/gitlab_stubs/session.json | 3 | ||||
-rw-r--r-- | spec/support/gitlab_stubs/user.json | 3 | ||||
-rw-r--r-- | spec/support/stub_gitlab_calls.rb | 8 |
3 files changed, 6 insertions, 8 deletions
diff --git a/spec/support/gitlab_stubs/session.json b/spec/support/gitlab_stubs/session.json index cc66044..ce8dfe5 100644 --- a/spec/support/gitlab_stubs/session.json +++ b/spec/support/gitlab_stubs/session.json @@ -15,5 +15,6 @@ "is_admin":false, "can_create_group":false, "can_create_project":false, - "private_token":"Wvjy2Krpb7y8xi93owUz" + "private_token":"Wvjy2Krpb7y8xi93owUz", + "access_token":"Wvjy2Krpb7y8xi93owUz" }
\ No newline at end of file diff --git a/spec/support/gitlab_stubs/user.json b/spec/support/gitlab_stubs/user.json index cc66044..ce8dfe5 100644 --- a/spec/support/gitlab_stubs/user.json +++ b/spec/support/gitlab_stubs/user.json @@ -15,5 +15,6 @@ "is_admin":false, "can_create_group":false, "can_create_project":false, - "private_token":"Wvjy2Krpb7y8xi93owUz" + "private_token":"Wvjy2Krpb7y8xi93owUz", + "access_token":"Wvjy2Krpb7y8xi93owUz" }
\ No newline at end of file diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb index f378219..9efdab0 100644 --- a/spec/support/stub_gitlab_calls.rb +++ b/spec/support/stub_gitlab_calls.rb @@ -2,7 +2,6 @@ module StubGitlabCalls def stub_gitlab_calls stub_session stub_user - stub_oauth_user stub_project_8 stub_project_8_hooks stub_projects @@ -32,13 +31,9 @@ module StubGitlabCalls def stub_user f = File.read(Rails.root.join('spec/support/gitlab_stubs/user.json')) - stub_request(:get, "#{gitlab_url}api/v3/user.json?private_token=Wvjy2Krpb7y8xi93owUz"). + stub_request(:get, "#{gitlab_url}api/v3/user?private_token=Wvjy2Krpb7y8xi93owUz"). with(:headers => {'Content-Type'=>'application/json'}). to_return(:status => 200, :body => f, :headers => {'Content-Type'=>'application/json'}) - end - - def stub_oauth_user - f = File.read(Rails.root.join('spec/support/gitlab_stubs/user.json')) stub_request(:get, "#{gitlab_url}api/v3/user?access_token=some_token"). with(:headers => {'Content-Type'=>'application/json'}). @@ -57,6 +52,7 @@ module StubGitlabCalls def stub_projects f = File.read(Rails.root.join('spec/support/gitlab_stubs/projects.json')) + stub_request(:get, "#{gitlab_url}api/v3/projects.json?archived=false&private_token=Wvjy2Krpb7y8xi93owUz"). with(:headers => {'Content-Type'=>'application/json'}). to_return(:status => 200, :body => f, :headers => {'Content-Type'=>'application/json'}) |