aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/controllers/request_controller_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index da0cbf528..0705c978d 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -169,6 +169,16 @@ describe RequestController, "when creating a new request" do
response.should render_template('new')
end
+ it "should give an error if the same request is submitted twice with extra whitespace in the body" do
+ session[:user_id] = users(:bob_smith_user).id
+
+ post :new, :info_request => { :public_body_id => info_requests(:fancy_dog_request).public_body_id,
+ :title => info_requests(:fancy_dog_request).title },
+ :outgoing_message => { :body => "\n" + info_requests(:fancy_dog_request).outgoing_messages[0].body + " "},
+ :submitted_new_request => 1, :preview => 0, :mouse_house => 1
+ response.should render_template('new')
+ end
+
it "should let you submit another request with the same title" do
session[:user_id] = users(:bob_smith_user).id