summaryrefslogtreecommitdiff
path: root/spec/models/gpg_key_spec.rb
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-02-23 14:07:51 +0100
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 15:40:41 +0200
commit5ce61120b19f7f12e7aff714857851f57571ce0e (patch)
tree2d449b61f927aa93668a9af0aba390c99fbe8361 /spec/models/gpg_key_spec.rb
parent597ae6e2208a4910544e5877db7fff300a058886 (diff)
downloadgitlab-ce-5ce61120b19f7f12e7aff714857851f57571ce0e.tar.gz
use example gpg key instead of my own
Diffstat (limited to 'spec/models/gpg_key_spec.rb')
-rw-r--r--spec/models/gpg_key_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/gpg_key_spec.rb b/spec/models/gpg_key_spec.rb
index 6bfd0b0d4f6..917d420878a 100644
--- a/spec/models/gpg_key_spec.rb
+++ b/spec/models/gpg_key_spec.rb
@@ -18,7 +18,7 @@ describe GpgKey do
it 'extracts the fingerprint from the gpg key' do
gpg_key = described_class.new(key: GpgHelpers::User1.public_key)
gpg_key.valid?
- expect(gpg_key.fingerprint).to eq '4F4840A503964251CF7D7F5DC728AF10972E97C0'
+ expect(gpg_key.fingerprint).to eq GpgHelpers::User1.fingerprint
end
end
@@ -34,7 +34,7 @@ describe GpgKey do
allow(Gitlab::Gpg).to receive :add_to_keychain
gpg_key = create :gpg_key
- expect(Gitlab::Gpg).to receive(:remove_from_keychain).with('4F4840A503964251CF7D7F5DC728AF10972E97C0')
+ expect(Gitlab::Gpg).to receive(:remove_from_keychain).with(GpgHelpers::User1.fingerprint)
gpg_key.destroy!
end
@@ -57,9 +57,9 @@ describe GpgKey do
describe '#emails', :gpg do
it 'returns the emails from the gpg key' do
- gpg_key = create :gpg_key
+ gpg_key = create :gpg_key, key: GpgHelpers::User1.public_key
- expect(gpg_key.emails).to match_array %w(mail@koffeinfrei.org lex@panter.ch)
+ expect(gpg_key.emails).to eq [GpgHelpers::User1.email]
end
end
end