diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-07-02 13:29:50 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-07-02 13:29:50 +0300 |
commit | 7015ef1b60895ffa2a46b4a41f8f02018f74614c (patch) | |
tree | 401e3adc848ab6913e1f70e5f15a76d1133d86e9 /spec/support/stub_gitlab_calls.rb | |
parent | 52e0d4754f70dddbad19b59cda9483152abf0617 (diff) | |
download | gitlab-ci-oauth_everywhere.tar.gz |
Get rid of private message usageoauth_everywhere
Diffstat (limited to 'spec/support/stub_gitlab_calls.rb')
-rw-r--r-- | spec/support/stub_gitlab_calls.rb | 8 |
1 files changed, 2 insertions, 6 deletions
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'}) |