Commit ead7045a authored by Kerri Miller's avatar Kerri Miller

Merge branch '326995-refer-to-expired-ssh-keys-in-the-past-tense' into 'master'

Refer to expired SSH keys in the past tense

See merge request gitlab-org/gitlab!59381
parents 95e02487 8da90045
......@@ -23,7 +23,7 @@
= s_('Profiles|Last used:')
= key.last_used_at ? time_ago_with_tooltip(key.last_used_at) : _('Never')
%span.expires.gl-mr-3
= s_('Profiles|Expires:')
= key.expired? ? s_('Profiles|Expired:') : s_('Profiles|Expires:')
= key.expires_at ? key.expires_at.to_date : _('Never')
%span.key-created-at.gl-display-flex.gl-align-items-center
- if key.can_delete?
......
---
title: Update profile SSH key labels to refer to expired keys as "Expired"
merge_request: 59381
author:
type: changed
......@@ -24167,6 +24167,9 @@ msgstr ""
msgid "Profiles|Expired key is not valid."
msgstr ""
msgid "Profiles|Expired:"
msgstr ""
msgid "Profiles|Expires at"
msgstr ""
......
......@@ -58,6 +58,20 @@ RSpec.describe 'profiles/keys/_key.html.haml' do
end
end
context 'when the key has expired' do
let_it_be(:key) do
create(:personal_key,
user: user,
expires_at: 2.days.ago)
end
it 'renders "Expired:" as the expiration date label' do
render
expect(rendered).to have_text('Expired:')
end
end
context 'when the key is not deletable' do
# Turns out key.can_delete? is only false for LDAP keys
# but LDAP keys don't exist outside EE
......
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