Use have_link over have_content for GPG feature

It's more semantically accurate for what we're verifying.
This commit is contained in:
Robert Speicher 2018-11-21 19:41:52 +01:00
parent ee17268690
commit 87d1e865f5
No known key found for this signature in database
GPG Key ID: 1D812769A7706642
1 changed files with 9 additions and 9 deletions

View File

@ -15,8 +15,8 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
expect(page).to have_content 'Unverified'
expect(page).not_to have_content 'Verified'
expect(page).to have_link 'Unverified'
expect(page).not_to have_link 'Verified'
# user changes his email which makes the gpg key verified
perform_enqueued_jobs do
@ -26,8 +26,8 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
expect(page).not_to have_content 'Unverified'
expect(page).to have_content 'Verified'
expect(page).not_to have_link 'Unverified'
expect(page).to have_link 'Verified'
end
it 'changes from unverified to verified when the user adds the missing gpg key' do
@ -36,8 +36,8 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
expect(page).to have_content 'Unverified'
expect(page).not_to have_content 'Verified'
expect(page).to have_link 'Unverified'
expect(page).not_to have_link 'Verified'
# user adds the gpg key which makes the signature valid
perform_enqueued_jobs do
@ -46,8 +46,8 @@ describe 'GPG signed commits' do
visit project_commit_path(project, ref)
expect(page).not_to have_content 'Unverified'
expect(page).to have_content 'Verified'
expect(page).not_to have_link 'Unverified'
expect(page).to have_link 'Verified'
end
context 'shows popover badges', :js do
@ -136,7 +136,7 @@ describe 'GPG signed commits' do
visit project_commit_path(project, GpgHelpers::SIGNED_AND_AUTHORED_SHA)
# wait for the signature to get generated
expect(page).to have_content 'Verified'
expect(page).to have_link 'Verified'
user_1.destroy!