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-05-28 00:08:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-28 00:08:05 +0300
commit47579e24f3f9f29d5b8093f54e6958fefd7f2057 (patch)
treee8dedf16ceaa2143ce4e81906527a4670cb9916a /spec/requests/openid_connect_spec.rb
parent88ccc935c04ff0e015be60bac02853770b79d28d (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/requests/openid_connect_spec.rb')
-rw-r--r--spec/requests/openid_connect_spec.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/requests/openid_connect_spec.rb b/spec/requests/openid_connect_spec.rb
index bd270679acd..785ab98a3d0 100644
--- a/spec/requests/openid_connect_spec.rb
+++ b/spec/requests/openid_connect_spec.rb
@@ -9,15 +9,11 @@ describe 'OpenID Connect requests' do
name: 'Alice',
username: 'alice',
email: 'private@example.com',
- emails: [public_email],
- public_email: public_email.email,
website_url: 'https://example.com',
avatar: fixture_file_upload('spec/fixtures/dk.png')
)
end
- let(:public_email) { build :email, email: 'public@example.com' }
-
let(:access_grant) { create :oauth_access_grant, application: application, resource_owner_id: user.id }
let(:access_token) { create :oauth_access_token, application: application, resource_owner_id: user.id }
@@ -37,7 +33,7 @@ describe 'OpenID Connect requests' do
'name' => 'Alice',
'nickname' => 'alice',
'email' => 'public@example.com',
- 'email_verified' => false,
+ 'email_verified' => true,
'website' => 'https://example.com',
'profile' => 'http://localhost/alice',
'picture' => "http://localhost/uploads/-/system/user/avatar/#{user.id}/dk.png",
@@ -62,6 +58,11 @@ describe 'OpenID Connect requests' do
get '/oauth/userinfo', params: {}, headers: { 'Authorization' => "Bearer #{access_token.token}" }
end
+ before do
+ email = create(:email, :confirmed, email: 'public@example.com', user: user)
+ user.update!(public_email: email.email)
+ end
+
context 'Application without OpenID scope' do
let(:application) { create :oauth_application, scopes: 'api' }
@@ -123,7 +124,7 @@ describe 'OpenID Connect requests' do
end
it 'has false in email_verified claim' do
- expect(json_response['email_verified']).to eq(false)
+ expect(json_response['email_verified']).to eq(true)
end
end