aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/request_controller_spec.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index a15fb035f..7e26d0ada 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -770,16 +770,6 @@ describe RequestController, "when showing one request" do
describe 'when making a zipfile available' do
- it 'should return a 410 for a request that is hidden' do
- title = 'why_do_you_have_such_a_fancy_dog'
- ir = info_requests(:fancy_dog_request)
- ir.prominence = 'hidden'
- ir.save!
- get :download_entire_request, {:url_title => title}, { :user_id => ir.user.id }
- response.should render_template('request/hidden')
- response.code.should == '410'
- end
-
it "should have a different zipfile URL when the request changes" do
title = 'why_do_you_have_such_a_fancy_dog'
ir = info_requests(:fancy_dog_request)
@@ -911,6 +901,12 @@ describe RequestController, "when handling prominence" do
response.should render_template('show')
end
+ it 'should not allow download of the entire request by admin user (or anyone)' do
+ session[:user_id] = FactoryGirl.create(:admin_user).id
+ get :download_entire_request, :url_title => @info_request.url_title
+ expect_hidden('hidden')
+ end
+
it 'should not cache an attachment when showing an attachment to the requester or admin' do
session[:user_id] = @info_request.user.id
incoming_message = @info_request.incoming_messages.first