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:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-11-23 19:44:09 +0300
committerNick Thomas <nick@gitlab.com>2018-11-23 19:44:09 +0300
commit9a5703ec82d394c2549f5afda7280c889d4cc373 (patch)
treea4a5b2fdaccf5743cff5871fe7b6bac47b42f6cf /spec/controllers/profiles
parent63c1ad18b77e24af53e6c56fd45f8b2fa5994018 (diff)
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