aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-12-13 21:13:54 +0000
committerLouise Crow <louise.crow@gmail.com>2012-12-13 21:13:54 +0000
commit4a42afb6feaca5f3ed81ae6a64d29e273a52039b (patch)
treefa10b2050276122077dfb69c0b22ad648918f464 /spec/controllers/request_controller_spec.rb
parent67e897f9edb4d0c6ca4b54fb3af87a0ee490a4d3 (diff)
parenta5744b206cf1ca811f913d68cafc0178079be2f7 (diff)
Merge branch 'hotfix/authenticate-and-expire-download-zips' into develop
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 4e8a11d45..521ad7b5a 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -727,6 +727,16 @@ 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)
@@ -765,7 +775,7 @@ describe RequestController, "when showing one request" do
info_request = info_requests(:external_request)
get :download_entire_request, { :url_title => info_request.url_title },
{ :user_id => users(:bob_smith_user) }
- response.location.should have_text(/#{assigns[:url_path]}/)
+ response.location.should have_text(/#{assigns[:url_path]}$/)
end
end
end