diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-13 16:22:15 +0300 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 16:44:39 +0300 |
commit | cd01e82873b3cd471203dbf557c71571fd683d16 (patch) | |
tree | 08372f91287ec4c9a14d95044a0eff7fbe8e78c3 /spec/lib/gitlab/gpg_spec.rb | |
parent | 506836a695ae40ff200add21c639f3d13aaee9e9 (diff) |
store gpg user name and email on the signature
Diffstat (limited to 'spec/lib/gitlab/gpg_spec.rb')
-rw-r--r-- | spec/lib/gitlab/gpg_spec.rb | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/lib/gitlab/gpg_spec.rb b/spec/lib/gitlab/gpg_spec.rb index ebb7720eaea..8041518117d 100644 --- a/spec/lib/gitlab/gpg_spec.rb +++ b/spec/lib/gitlab/gpg_spec.rb @@ -28,16 +28,18 @@ describe Gitlab::Gpg do end end - describe '.emails_from_key' do - it 'returns the emails' do - expect( - described_class.emails_from_key(GpgHelpers::User1.public_key) - ).to eq GpgHelpers::User1.emails + describe '.user_infos_from_key' do + it 'returns the names and emails' do + user_infos = described_class.user_infos_from_key(GpgHelpers::User1.public_key) + expect(user_infos).to eq([{ + name: GpgHelpers::User1.names.first, + email: GpgHelpers::User1.emails.first + }]) end it 'returns an empty array when the key is invalid' do expect( - described_class.emails_from_key('bogus') + described_class.user_infos_from_key('bogus') ).to eq [] end end |