Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Reigel <mail@koffeinfrei.org>2017-07-13 16:22:15 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:44:39 +0300
commitcd01e82873b3cd471203dbf557c71571fd683d16 (patch)
tree08372f91287ec4c9a14d95044a0eff7fbe8e78c3 /spec/lib/gitlab/gpg_spec.rb
parent506836a695ae40ff200add21c639f3d13aaee9e9 (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.rb14
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