diff options
Diffstat (limited to 'spec/views/profiles/keys')
-rw-r--r-- | spec/views/profiles/keys/_key.html.haml_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/views/profiles/keys/_key.html.haml_spec.rb b/spec/views/profiles/keys/_key.html.haml_spec.rb index 4d14ce7c909..9ce6779d3ae 100644 --- a/spec/views/profiles/keys/_key.html.haml_spec.rb +++ b/spec/views/profiles/keys/_key.html.haml_spec.rb @@ -39,7 +39,7 @@ RSpec.describe 'profiles/keys/_key.html.haml', feature_category: :system_access it 'renders "Unavailable" for last used' do render - expect(rendered).to have_text('Last used: Unavailable') + expect(rendered).to have_text('Unavailable') end end @@ -62,7 +62,7 @@ RSpec.describe 'profiles/keys/_key.html.haml', feature_category: :system_access it 'renders "Never" for last used' do render - expect(rendered).to have_text('Last used: Never') + expect(rendered).to have_text('Never') end end end @@ -85,11 +85,11 @@ RSpec.describe 'profiles/keys/_key.html.haml', feature_category: :system_access expect(rendered).to have_text(usage_type_text) displayed_buttons.each do |button| - expect(rendered).to have_text(button) + expect(rendered).to have_css("button[aria-label=#{button}]") end hidden_buttons.each do |button| - expect(rendered).not_to have_text(button) + expect(rendered).not_to have_css("button[aria-label=#{button}]") end end end @@ -103,17 +103,17 @@ RSpec.describe 'profiles/keys/_key.html.haml', feature_category: :system_access it 'renders "Never" for expires' do render - expect(rendered).to have_text('Expires: Never') + expect(rendered).to have_text('Never') end end context 'when the key has expired' do let_it_be(:key) { create(:personal_key, :expired, user: user) } - it 'renders "Expired:" as the expiration date label' do + it 'renders "Expired" as the expiration date label' do render - expect(rendered).to have_text('Expired:') + expect(rendered).to have_text('Expired') end end |