summaryrefslogtreecommitdiff
path: root/spec/features/profiles
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-12 07:59:28 +0200
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 15:43:37 +0200
commit027309eb2ae54614a2ee1a0ca9e4cea76a86b94b (patch)
treed5479187f2a89e2a24e5a62044861effd05b841c /spec/features/profiles
parent111edaa9f75f402cc18c2bec5cab9aa6615d9c4d (diff)
downloadgitlab-ce-027309eb2ae54614a2ee1a0ca9e4cea76a86b94b.tar.gz
user may now revoke a gpg key
other than just removing a key, which doesn't affect the verified state of a commit, revoking a key unverifies all signed commits.
Diffstat (limited to 'spec/features/profiles')
-rw-r--r--spec/features/profiles/gpg_keys_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/features/profiles/gpg_keys_spec.rb b/spec/features/profiles/gpg_keys_spec.rb
index 350126523b0..6edc482b47e 100644
--- a/spec/features/profiles/gpg_keys_spec.rb
+++ b/spec/features/profiles/gpg_keys_spec.rb
@@ -39,4 +39,20 @@ feature 'Profile > GPG Keys' do
expect(page).to have_content('Your GPG keys (0)')
end
+
+ scenario 'User revokes a key via the key index' do
+ gpg_key = create :gpg_key, user: user, key: GpgHelpers::User2.public_key
+ gpg_signature = create :gpg_signature, gpg_key: gpg_key, valid_signature: true
+
+ visit profile_gpg_keys_path
+
+ click_link('Revoke')
+
+ expect(page).to have_content('Your GPG keys (0)')
+
+ expect(gpg_signature.reload).to have_attributes(
+ valid_signature: false,
+ gpg_key: nil
+ )
+ end
end