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/controllers
parent58c76605b31f56c8a2dff9381feae859bedb2076 (diff)
Only publish ssh key-type and key
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/profile_keys_controller_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/controllers/profile_keys_controller_spec.rb b/spec/controllers/profile_keys_controller_spec.rb
index 593d3e9eb56..b6573f105dc 100644
--- a/spec/controllers/profile_keys_controller_spec.rb
+++ b/spec/controllers/profile_keys_controller_spec.rb
@@ -48,6 +48,17 @@ describe Profiles::KeysController do
expect(response.body).not_to eq("")
expect(response.body).to eq(user.all_ssh_keys.join("\n"))
+
+ # Unique part of key 1
+ expect(response.body).to match(/PWx6WM4lhHNedGfBpPJNPpZ/)
+ # Key 2
+ expect(response.body).to match(/AQDmTillFzNTrrGgwaCKaSj/)
+ end
+
+ it "should not render the comment of the key" do
+ get :get_keys, username: user.username
+
+ expect(response.body).not_to match(/dummy@gitlab.com/)
end
it "should respond with text/plain content type" do