diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/views/profiles/keys/_key.html.haml_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/views/profiles/keys/_key.html.haml_spec.rb')
-rw-r--r-- | spec/views/profiles/keys/_key.html.haml_spec.rb | 8 |
1 files changed, 1 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 ed8026d2453..1040541332d 100644 --- a/spec/views/profiles/keys/_key.html.haml_spec.rb +++ b/spec/views/profiles/keys/_key.html.haml_spec.rb @@ -59,11 +59,7 @@ RSpec.describe 'profiles/keys/_key.html.haml' do end context 'when the key has expired' do - let_it_be(:key) do - create(:personal_key, - user: user, - expires_at: 2.days.ago) - end + let_it_be(:key) { create(:personal_key, :expired, user: user) } it 'renders "Expired:" as the expiration date label' do render @@ -91,8 +87,6 @@ RSpec.describe 'profiles/keys/_key.html.haml' do where(:valid, :expiry, :result) do false | 2.days.from_now | 'Key type is forbidden. Must be DSA, ECDSA, ED25519, ECDSA_SK, or ED25519_SK' - false | 2.days.ago | 'Key type is forbidden. Must be DSA, ECDSA, ED25519, ECDSA_SK, or ED25519_SK' - true | 2.days.ago | 'Key usable beyond expiration date.' true | 2.days.from_now | '' end |