diff options
author | francis <francis> | 2008-07-29 11:12:36 +0000 |
---|---|---|
committer | francis <francis> | 2008-07-29 11:12:36 +0000 |
commit | 5059b562f1d002ede63013a116ae713316475295 (patch) | |
tree | 3cb3058e8c025f5bf04974bafa0186d6b1964065 /spec/controllers/request_controller_spec.rb | |
parent | 1a36d38bb490d99e480e00e2f22e9a614830fe61 (diff) |
Extra test of duplicate checking.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 10 |
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 |