aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index df32a1397..6652d8f1f 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -2565,6 +2565,14 @@ describe RequestController, "#new_batch", :focus => true do
response.should render_template('new')
end
+ it 'should create an info request batch and redirect to the new batch on success' do
+ params = @default_post_params.merge(:preview => 0)
+ post :new_batch, params, { :user_id => @user.id }
+ new_info_request_batch = assigns[:info_request_batch]
+ new_info_request_batch.should_not be_nil
+ response.should redirect_to(info_request_batch_path(new_info_request_batch))
+ end
+
context "when the user is banned" do
before do