aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/request_controller_spec.rb
diff options
context:
space:
mode:
authorfrancis <francis>2008-01-04 15:12:32 +0000
committerfrancis <francis>2008-01-04 15:12:32 +0000
commit26c033ba9e7cc0211881d0e388d05423567a81e4 (patch)
treea79e094f08f813f71c1a6b9496cbedcccec61c1d /spec/controllers/request_controller_spec.rb
parent9dedbd802e74af4b865cc2ef6ca2db9c5e23bdef (diff)
Merge request's create action into the new action, so if you copy
the URL after posting the new request form it is still a working page.
Diffstat (limited to 'spec/controllers/request_controller_spec.rb')
-rw-r--r--spec/controllers/request_controller_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb
index 7dde21ba5..a6668c7e1 100644
--- a/spec/controllers/request_controller_spec.rb
+++ b/spec/controllers/request_controller_spec.rb
@@ -101,7 +101,7 @@ describe RequestController, "when creating a new request" do
end
it "should give an error and render 'new' template when a summary isn't given" do
- post :create, :info_request => { :public_body_id => public_bodies(:geraldine_public_body).id
+ post :new, :info_request => { :public_body_id => public_bodies(:geraldine_public_body).id
},
:outgoing_message => { :body => "This is a silly letter. It is too short to be interesting." }
response.should render_template('new')
@@ -112,7 +112,7 @@ describe RequestController, "when creating a new request" do
:title => "Why is your quango called Geraldine?"},
:outgoing_message => { :body => "This is a silly letter. It is too short to be interesting." }
}
- post :create, params
+ post :new, params
# XXX yeuch - no other easy way of getting the token so we can check
# the redirect URL, as it is by definition opaque to the controller
# apart from in the place that it redirects to.
@@ -125,7 +125,7 @@ describe RequestController, "when creating a new request" do
it "should create the request and outgoing message and redirect to request page when input is good and somebody is logged in" do
session[:user_id] = users(:bob_smith_user).id
- post :create, :info_request => { :public_body_id => public_bodies(:geraldine_public_body).id,
+ post :new, :info_request => { :public_body_id => public_bodies(:geraldine_public_body).id,
:title => "Why is your quango called Geraldine?"},
:outgoing_message => { :body => "This is a silly letter. It is too short to be interesting." }
ir_array = InfoRequest.find(:all, :conditions => ["title = ?", "Why is your quango called Geraldine?"])
@@ -138,7 +138,7 @@ describe RequestController, "when creating a new request" do
end
it "should give an error if the same request is submitted twice" do
- post :create, :info_request => { :public_body_id => info_requests(:fancy_dog_request).public_body_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 => info_requests(:fancy_dog_request).outgoing_messages[0].body}
response.should render_template('new')