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:
authorZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-06-19 20:17:34 +0300
committerZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-08-04 15:33:18 +0300
commit4ccd767abf45df909c43e93d8898096236c99e3d (patch)
tree3cf46a9dd0d7db5c7a2abb9759a9b39e3fe90277 /spec/models/key_spec.rb
parent58c76605b31f56c8a2dff9381feae859bedb2076 (diff)
Only publish ssh key-type and key
Diffstat (limited to 'spec/models/key_spec.rb')
-rw-r--r--spec/models/key_spec.rb7
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