Fix signed commits spec
This commit is contained in:
parent
b933a6de11
commit
0da1f82616
|
|
@ -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'
|
||||
|
|
@ -176,4 +182,3 @@ describe 'GPG signed commits', :js do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue