From 0f43f36254c9bbd1a66f5fd0951d5c2517581e4d Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Wed, 27 Nov 2013 12:53:13 +0000 Subject: Display batch requests for user on 'my requests' page This is the most rudimentary possible way to give them access to the batch request urls, pending #1239 --- spec/controllers/user_controller_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'spec/controllers/user_controller_spec.rb') diff --git a/spec/controllers/user_controller_spec.rb b/spec/controllers/user_controller_spec.rb index 7a9981a04..cf361d898 100644 --- a/spec/controllers/user_controller_spec.rb +++ b/spec/controllers/user_controller_spec.rb @@ -58,9 +58,10 @@ describe UserController, "when showing a user" do get :show, {:url_name => @user.url_name, :view => 'profile'}, {:user_id => @user.id} end - it 'should not show requests but should show account options' do + it 'should not show requests, or batch requests, but should show account options' do make_request response.body.should_not match(/Freedom of Information requests made by you/) + assigns[:show_batches].should be_false response.body.should include("Change your password") end @@ -74,9 +75,10 @@ describe UserController, "when showing a user" do get :show, {:url_name => @user.url_name, :view => 'requests'}, {:user_id => @user.id} end - it 'should show requests but no account options' do + it 'should show requests, batch requests, but no account options' do make_request response.body.should match(/Freedom of Information requests made by you/) + assigns[:show_batches].should be_true response.body.should_not include("Change your password") end -- cgit v1.2.3