Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-06-16 18:08:32 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-16 18:08:32 +0300
commit10fd79745df7b572fc79fd84b58e818e64bf2571 (patch)
treea89151d08c7a13334843b3a6f9010c00acabcb2b /spec/requests/api/oauth_tokens_spec.rb
parent9bfdb5cf67ca45ac6d354e18168f5df12b60ccd2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/api/oauth_tokens_spec.rb')
-rw-r--r--spec/requests/api/oauth_tokens_spec.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb
index 3266fed1741..5e775841f12 100644
--- a/spec/requests/api/oauth_tokens_spec.rb
+++ b/spec/requests/api/oauth_tokens_spec.rb
@@ -3,20 +3,9 @@
require 'spec_helper'
describe 'OAuth tokens' do
- context 'Resource Owner Password Credentials' do
- def basic_auth_header(username, password)
- {
- 'HTTP_AUTHORIZATION' => ActionController::HttpAuthentication::Basic.encode_credentials(
- username,
- password
- )
- }
- end
-
- def client_basic_auth_header(client)
- basic_auth_header(client.uid, client.secret)
- end
+ include HttpBasicAuthHelpers
+ context 'Resource Owner Password Credentials' do
def request_oauth_token(user, headers = {})
post '/oauth/token',
params: { username: user.username, password: user.password, grant_type: 'password' },