aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2013-03-22 14:50:01 +1100
committerMatthew Landauer <matthew@openaustralia.org>2013-03-22 14:50:01 +1100
commit661ad52ef88de7afcbd7820d8283057764f4d1ac (patch)
treedcaebe1fd1020c10c74d55261e6312e49a2a2104 /spec/controllers/request_controller_spec.rb
parentadac483b0f8133c8d9623dba24b6c52f1cc0f8a9 (diff)
Only allow posts for reporting request. Don't try redirection when not logged in
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index d73fb89c7..260fbb9fa 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -2294,9 +2294,10 @@ end
describe RequestController, "when reporting a request when not logged in" do
it "should only allow logged-in users to report requests" do
- get :report_request, :url_title => info_requests(:badger_request).url_title
- post_redirect = PostRedirect.get_last_post_redirect
- response.should redirect_to(:controller => 'user', :action => 'signin', :token => post_redirect.token)
+ post :report_request, :url_title => info_requests(:badger_request).url_title
+
+ flash[:notice].should =~ /You need to be logged in/
+ response.should redirect_to show_request_path(:url_title => info_requests(:badger_request).url_title)
end
end