diff options
author | Valery Sizov <valery@gitlab.com> | 2015-01-16 16:02:00 -0800 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2015-01-16 16:02:00 -0800 |
commit | 204af93bde1dd0f586612e52dcd6b28fc8cc842f (patch) | |
tree | 5b4fe4f6392225155ce638ec7a6d3f38877b8591 | |
parent | b36c912e65a25fdd246d84f3705d7fbe3ce211d0 (diff) | |
download | gitlab-ci-204af93bde1dd0f586612e52dcd6b28fc8cc842f.tar.gz |
OAuth2: remove stup for access_token request
-rw-r--r-- | spec/support/gitlab_stubs/oauth_access_token.json | 1 | ||||
-rw-r--r-- | spec/support/stub_gitlab_calls.rb | 10 |
2 files changed, 0 insertions, 11 deletions
diff --git a/spec/support/gitlab_stubs/oauth_access_token.json b/spec/support/gitlab_stubs/oauth_access_token.json deleted file mode 100644 index 320ef1a..0000000 --- a/spec/support/gitlab_stubs/oauth_access_token.json +++ /dev/null @@ -1 +0,0 @@ -{"access_token":"dbaf9757982a9e738f05d249b7b5b4a266b3a139049317c4909f2f263572c781","token_type":"bearer","expires_in":7200,"refresh_token":"76ba4c5c75c96f6087f58a4de10be6c00b29ea1ddc3b2022ee2016d1363e3a7c","scope":"public"}
\ No newline at end of file diff --git a/spec/support/stub_gitlab_calls.rb b/spec/support/stub_gitlab_calls.rb index cc34554..6cf740a 100644 --- a/spec/support/stub_gitlab_calls.rb +++ b/spec/support/stub_gitlab_calls.rb @@ -3,7 +3,6 @@ module StubGitlabCalls stub_session stub_user stub_oauth_user - stub_oauth_provider stub_project_8 stub_projects stub_projects_owned @@ -65,15 +64,6 @@ module StubGitlabCalls to_return(:status => 200, :body => "", :headers => {}) end - def stub_oauth_provider - f = File.read(Rails.root.join('spec/support/gitlab_stubs/oauth_access_token.json')) - stub_request(:post, "http://demo.gitlab.com/oauth/token"). - with(:body => {"client_id"=>"", "client_secret"=>"", "code"=>"some_auth_code_here", "grant_type"=>"authorization_code", "redirect_uri"=>"http://www.example.com/user_sessions/callback"}, - :headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/x-www-form-urlencoded', 'User-Agent'=>'Faraday v0.9.1'}). - to_return(:status => 200, :body => f, :headers => {'Content-Type'=>'application/json'}) - - end - def project_hash_array f = File.read(Rails.root.join('spec/support/gitlab_stubs/projects.json')) return JSON.parse f |