summaryrefslogtreecommitdiff
path: root/spec/controllers/profiles
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-11-23 16:44:09 +0000
committerNick Thomas <nick@gitlab.com>2018-11-23 16:44:09 +0000
commit9a5703ec82d394c2549f5afda7280c889d4cc373 (patch)
treea4a5b2fdaccf5743cff5871fe7b6bac47b42f6cf /spec/controllers/profiles
parent63c1ad18b77e24af53e6c56fd45f8b2fa5994018 (diff)
downloadgitlab-ce-9a5703ec82d394c2549f5afda7280c889d4cc373.tar.gz
Set content disposition attachment to several endpoints
Diffstat (limited to 'spec/controllers/profiles')
-rw-r--r--spec/controllers/profiles/keys_controller_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/profiles/keys_controller_spec.rb b/spec/controllers/profiles/keys_controller_spec.rb
index ea26bc83353..685db8488f0 100644
--- a/spec/controllers/profiles/keys_controller_spec.rb
+++ b/spec/controllers/profiles/keys_controller_spec.rb
@@ -62,8 +62,15 @@ describe Profiles::KeysController do
it "responds with text/plain content type" do
get :get_keys, username: user.username
+
expect(response.content_type).to eq("text/plain")
end
+
+ it "responds with attachment content disposition" do
+ get :get_keys, username: user.username
+
+ expect(response.headers['Content-Disposition']).to eq('attachment')
+ end
end
end
end