diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-02-23 16:07:51 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:40:41 +0300 |
commit | 5ce61120b19f7f12e7aff714857851f57571ce0e (patch) | |
tree | 2d449b61f927aa93668a9af0aba390c99fbe8361 /spec/lib/gitlab/gpg_spec.rb | |
parent | 597ae6e2208a4910544e5877db7fff300a058886 (diff) |
use example gpg key instead of my own
Diffstat (limited to 'spec/lib/gitlab/gpg_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gpg_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/gpg_spec.rb b/spec/lib/gitlab/gpg_spec.rb index 04a434a993d..6cfc634e2d9 100644 --- a/spec/lib/gitlab/gpg_spec.rb +++ b/spec/lib/gitlab/gpg_spec.rb @@ -5,7 +5,7 @@ describe Gitlab::Gpg do it 'returns the fingerprint' do expect( described_class.fingerprints_from_key(GpgHelpers::User1.public_key) - ).to eq ['4F4840A503964251CF7D7F5DC728AF10972E97C0'] + ).to eq [GpgHelpers::User1.fingerprint] end it 'returns an empty array when the key is invalid' do @@ -17,22 +17,22 @@ describe Gitlab::Gpg do describe '.add_to_keychain', :gpg do it 'stores the key in the keychain' do - expect(GPGME::Key.find(:public, '4F4840A503964251CF7D7F5DC728AF10972E97C0')).to eq [] + expect(GPGME::Key.find(:public, GpgHelpers::User1.fingerprint)).to eq [] Gitlab::Gpg.add_to_keychain(GpgHelpers::User1.public_key) - expect(GPGME::Key.find(:public, '4F4840A503964251CF7D7F5DC728AF10972E97C0')).not_to eq [] + expect(GPGME::Key.find(:public, GpgHelpers::User1.fingerprint)).not_to eq [] end end describe '.remove_from_keychain', :gpg do it 'removes the key from the keychain' do Gitlab::Gpg.add_to_keychain(GpgHelpers::User1.public_key) - expect(GPGME::Key.find(:public, '4F4840A503964251CF7D7F5DC728AF10972E97C0')).not_to eq [] + expect(GPGME::Key.find(:public, GpgHelpers::User1.fingerprint)).not_to eq [] - Gitlab::Gpg.remove_from_keychain('4F4840A503964251CF7D7F5DC728AF10972E97C0') + Gitlab::Gpg.remove_from_keychain(GpgHelpers::User1.fingerprint) - expect(GPGME::Key.find(:public, '4F4840A503964251CF7D7F5DC728AF10972E97C0')).to eq [] + expect(GPGME::Key.find(:public, GpgHelpers::User1.fingerprint)).to eq [] end end end |