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:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-13 17:04:19 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:44:39 +0300
commitc52718332cb723cc4b3035c17eec9eeb9926c8cf (patch)
tree44c8cdef653ed0f1a7d45a10dddda59fd927d47c /spec/features/commits_spec.rb
parentcd01e82873b3cd471203dbf557c71571fd683d16 (diff)
show gpg key's user info when no profile exists
Diffstat (limited to 'spec/features/commits_spec.rb')
-rw-r--r--spec/features/commits_spec.rb23
1 files changed, 20 insertions, 3 deletions
diff --git a/spec/features/commits_spec.rb b/spec/features/commits_spec.rb
index 74eaafc9000..b6b0cc7e1d3 100644
--- a/spec/features/commits_spec.rb
+++ b/spec/features/commits_spec.rb
@@ -263,21 +263,25 @@ describe 'Commits' do
end
it 'shows popover badges', :js do
- user = create :user, email: GpgHelpers::User1.emails.first, username: 'nannie.bernhard', name: 'Nannie Bernhard'
- project.team << [user, :master]
+ gpg_user = create :user, email: GpgHelpers::User1.emails.first, username: 'nannie.bernhard', name: 'Nannie Bernhard'
Sidekiq::Testing.inline! do
- create :gpg_key, key: GpgHelpers::User1.public_key, user: user
+ create :gpg_key, key: GpgHelpers::User1.public_key, user: gpg_user
end
+ user = create :user
+ project.team << [user, :master]
+
sign_in(user)
visit namespace_project_commits_path(project.namespace, project, :'signed-commits')
+ # unverified signature
click_on 'Unverified', match: :first
within '.popover' do
expect(page).to have_content 'This commit was signed with an unverified signature.'
expect(page).to have_content "GPG Key ID: #{GpgHelpers::User2.primary_keyid}"
end
+ # verified and the gpg user has a gitlab profile
click_on 'Verified'
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature.'
@@ -285,6 +289,19 @@ describe 'Commits' do
expect(page).to have_content 'Nannie Bernhard'
expect(page).to have_content "GPG Key ID: #{GpgHelpers::User1.primary_keyid}"
end
+
+ # verified and the gpg user's profile doesn't exist anymore
+ gpg_user.destroy!
+
+ visit namespace_project_commits_path(project.namespace, project, :'signed-commits')
+
+ click_on 'Verified'
+ within '.popover' do
+ expect(page).to have_content 'This commit was signed with a verified signature.'
+ expect(page).to have_content 'Nannie Bernhard'
+ expect(page).to have_content 'nannie.bernhard@example.com'
+ expect(page).to have_content "GPG Key ID: #{GpgHelpers::User1.primary_keyid}"
+ end
end
end
end