aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-10-24 11:45:19 +0100
committerLouise Crow <louise.crow@gmail.com>2013-12-04 09:32:41 +0000
commit539041a4404cb918b5d87ce3b858a20fba09f35a (patch)
tree354ac37062040049461f81d09d8ca3a4f6c9d1c5 /spec/controllers/request_controller_spec.rb
parentcb277edff24bd347db75e51c5bdb3e7ef5d1a498 (diff)
Handle a banned user making batch requests.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 2f1c2d07b..38566fde0 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -2563,6 +2563,21 @@ describe RequestController, "#new_batch", :focus => true do
response.should render_template('new')
end
+ context "when the user is banned" do
+
+ before do
+ @user.ban_text = "bad behaviour"
+ @user.save!
+ end
+
+ it 'should show the "banned" template' do
+ post :new_batch, @default_post_params, { :user_id => @user.id }
+ response.should render_template('user/banned')
+ assigns[:details].should == 'bad behaviour'
+ end
+
+ end
+
end
context "when the current user can't make batch requests" do