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-02-22 17:37:49 +0300
committerAlexis Reigel <mail@koffeinfrei.org>2017-07-27 16:40:40 +0300
commit7b7cd6f69d59092a55fc8b293edf09638fba20d9 (patch)
tree301427683e57800aeda05affc1057df192638437 /spec/models/gpg_key_spec.rb
parentfbf1fd1a204a24aef2b80473ec64a520ed2a2dfc (diff)
add emails method to GgpKey
Diffstat (limited to 'spec/models/gpg_key_spec.rb')
-rw-r--r--spec/models/gpg_key_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/gpg_key_spec.rb b/spec/models/gpg_key_spec.rb
index 02623c52fa6..24ef291a021 100644
--- a/spec/models/gpg_key_spec.rb
+++ b/spec/models/gpg_key_spec.rb
@@ -38,4 +38,12 @@ describe GpgKey do
expect(described_class.new(key: " #{key} ").key).to eq(key)
end
end
+
+ describe '#emails' do
+ it 'returns the emails from the gpg key' do
+ gpg_key = create :gpg_key
+
+ expect(gpg_key.emails).to match_array %w(mail@koffeinfrei.org lex@panter.ch)
+ end
+ end
end