diff options
author | Alexis Reigel <mail@koffeinfrei.org> | 2017-02-22 15:37:49 +0100 |
---|---|---|
committer | Alexis Reigel <mail@koffeinfrei.org> | 2017-07-27 15:40:40 +0200 |
commit | 7b7cd6f69d59092a55fc8b293edf09638fba20d9 (patch) | |
tree | 301427683e57800aeda05affc1057df192638437 /spec/models/gpg_key_spec.rb | |
parent | fbf1fd1a204a24aef2b80473ec64a520ed2a2dfc (diff) | |
download | gitlab-ce-7b7cd6f69d59092a55fc8b293edf09638fba20d9.tar.gz |
add emails method to GgpKey
Diffstat (limited to 'spec/models/gpg_key_spec.rb')
-rw-r--r-- | spec/models/gpg_key_spec.rb | 8 |
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 |