diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-06-15 13:28:07 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-06-15 13:28:07 +0100 |
commit | 4bb3e9d5ff49ec5fb108a5a618993248abcb3692 (patch) | |
tree | 02e4bdb5a52d77b2892c1fe8dab480b749541107 /spec/controllers/request_controller_spec.rb | |
parent | f6fb315a1b49e77b65327c381db81112dc42c8ae (diff) |
Revert "Set a "Content-Disposition: attachment" header when downloading files. Closes #428"
This reverts commit 506af7a640f63b17000ccfc5e1344bbc3039c913.
See issue #428 for a discussion
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 705d96316..28f56dcf6 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -290,6 +290,7 @@ describe RequestController, "when showing one request" do get :get_attachment, :incoming_message_id => ir.incoming_messages[1].id, :id => ir.id, :part => 2, :file_name => ['hello.txt'], :skip_cache => 1 response.content_type.should == "text/plain" response.should have_text(/Second hello/) + get :get_attachment, :incoming_message_id => ir.incoming_messages[1].id, :id => ir.id, :part => 3, :file_name => ['hello.txt'], :skip_cache => 1 response.content_type.should == "text/plain" response.should have_text(/First hello/) @@ -418,15 +419,6 @@ describe RequestController, "when showing one request" do response.should have_text(/an unusual sort of file/) end - it "should apply a content-disposition header" do - ir = info_requests(:fancy_dog_request) - receive_incoming_mail('incoming-request-attachment-unknown-extension.email', ir.incoming_email) - ir.reload - get :get_attachment, :incoming_message_id => ir.incoming_messages[1].id, :id => ir.id, :part => 2, :file_name => ['hello.qwglhm'], :skip_cache => 1 - response.headers.should include("Content-Disposition") - response.headers["Content-Disposition"].should include('hello.qwglhm') - end - it "should not download attachments with wrong file name" do ir = info_requests(:fancy_dog_request) receive_incoming_mail('incoming-request-two-same-name.email', ir.incoming_email) |