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/controllers | |
parent | 58c76605b31f56c8a2dff9381feae859bedb2076 (diff) | |
download | gitlab-ce-4ccd767abf45df909c43e93d8898096236c99e3d.tar.gz |
Only publish ssh key-type and key
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/profile_keys_controller_spec.rb | 11 |
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 |