diff options
author | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-06-19 19:17:34 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <mail@zjvandeweg.nl> | 2015-08-04 14:33:18 +0200 |
commit | 4ccd767abf45df909c43e93d8898096236c99e3d (patch) | |
tree | 3cf46a9dd0d7db5c7a2abb9759a9b39e3fe90277 /spec/models/key_spec.rb | |
parent | 58c76605b31f56c8a2dff9381feae859bedb2076 (diff) | |
download | gitlab-ce-4ccd767abf45df909c43e93d8898096236c99e3d.tar.gz |
Only publish ssh key-type and key
Diffstat (limited to 'spec/models/key_spec.rb')
-rw-r--r-- | spec/models/key_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/key_spec.rb b/spec/models/key_spec.rb index 456bf221d62..2f819f60cbb 100644 --- a/spec/models/key_spec.rb +++ b/spec/models/key_spec.rb @@ -32,6 +32,13 @@ describe Key do describe "Methods" do it { is_expected.to respond_to :projects } + it { is_expected.to respond_to :publishable_key } + + describe "#publishable_keys" do + it 'strips all personal information' do + expect(build(:key).publishable_key).not_to match(/dummy@gitlab/) + end + end end context "validation of uniqueness" do |