summaryrefslogtreecommitdiff
path: root/spec/controllers/profile_keys_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/profile_keys_controller_spec.rb')
-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