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>2021-03-10 15:09:14 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-10 15:09:14 +0300
commit152b3268d701b54cac9b615a0e29e0e5726bfd99 (patch)
treedeb2e10bd5aa7c5fd54988fb8bc2ca9ec819c0b2 /spec/requests/api/oauth_tokens_spec.rb
parent921173681c207356914a35ea3dca1afffeac8b05 (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.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/requests/api/oauth_tokens_spec.rb b/spec/requests/api/oauth_tokens_spec.rb
index 52c7408545f..edadfbc3d0c 100644
--- a/spec/requests/api/oauth_tokens_spec.rb
+++ b/spec/requests/api/oauth_tokens_spec.rb
@@ -27,13 +27,13 @@ RSpec.describe 'OAuth tokens' do
context 'when user does not have 2FA enabled' do
context 'when no client credentials provided' do
- it 'does not create an access token' do
+ it 'creates an access token' do
user = create(:user)
request_oauth_token(user)
- expect(response).to have_gitlab_http_status(:unauthorized)
- expect(json_response['access_token']).to be_nil
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(json_response['access_token']).to be_present
end
end
@@ -51,6 +51,8 @@ RSpec.describe 'OAuth tokens' do
context 'with invalid credentials' do
it 'does not create an access token' do
+ pending 'Enable this example after https://github.com/doorkeeper-gem/doorkeeper/pull/1488 is merged and released'
+
user = create(:user)
request_oauth_token(user, basic_auth_header(client.uid, 'invalid secret'))