Commit 0da1f826 authored by Clement Ho's avatar Clement Ho

Fix signed commits spec

parent b933a6de
......@@ -96,12 +96,13 @@ describe 'GPG signed commits', :js do
within(find('.commit', text: 'signed commit by bette cartwright')) do
click_on 'Unverified'
end
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
end
end
it 'unverified signature: user email does not match the committer email, but is the same user' do
user_2_key
......@@ -110,6 +111,8 @@ describe 'GPG signed commits', :js do
within(find('.commit', text: 'signed and authored commit by bette cartwright, different email')) do
click_on 'Unverified'
end
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature, but the committer email is not verified to belong to the same user.'
expect(page).to have_content 'Bette Cartwright'
......@@ -117,7 +120,6 @@ describe 'GPG signed commits', :js do
expect(page).to have_content "GPG Key ID: #{GpgHelpers::User2.primary_keyid}"
end
end
end
it 'unverified signature: user email does not match the committer email' do
user_2_key
......@@ -126,6 +128,8 @@ describe 'GPG signed commits', :js do
within(find('.commit', text: 'signed commit by bette cartwright')) do
click_on 'Unverified'
end
within '.popover' do
expect(page).to have_content "This commit was signed with a different user's verified signature."
expect(page).to have_content 'Bette Cartwright'
......@@ -133,7 +137,6 @@ describe 'GPG signed commits', :js do
expect(page).to have_content "GPG Key ID: #{GpgHelpers::User2.primary_keyid}"
end
end
end
it 'verified and the gpg user has a gitlab profile' do
user_1_key
......@@ -142,6 +145,8 @@ describe 'GPG signed commits', :js do
within(find('.commit', text: 'signed and authored commit by nannie bernhard')) do
click_on 'Verified'
end
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature and the committer email is verified to belong to the same user.'
expect(page).to have_content 'Nannie Bernhard'
......@@ -149,7 +154,6 @@ describe 'GPG signed commits', :js do
expect(page).to have_content "GPG Key ID: #{GpgHelpers::User1.primary_keyid}"
end
end
end
it "verified and the gpg user's profile doesn't exist anymore" do
user_1_key
......@@ -167,6 +171,8 @@ describe 'GPG signed commits', :js do
within(find('.commit', text: 'signed and authored commit by nannie bernhard')) do
click_on 'Verified'
end
within '.popover' do
expect(page).to have_content 'This commit was signed with a verified signature and the committer email is verified to belong to the same user.'
expect(page).to have_content 'Nannie Bernhard'
......@@ -175,5 +181,4 @@ describe 'GPG signed commits', :js do
end
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment