diff options
author | Henare Degan <henare.degan@gmail.com> | 2013-02-25 15:15:03 +1100 |
---|---|---|
committer | Henare Degan <henare.degan@gmail.com> | 2013-02-25 15:15:03 +1100 |
commit | fb4be794911d6f01ee46bb31753d47c414d682a1 (patch) | |
tree | a55e0ecba60607eac42d4c7eae7fc83992e255a9 | |
parent | 01f80bfcdcb055705552146cebccec0162caff49 (diff) |
response.flash has been deprecated
-rw-r--r-- | spec/controllers/admin_public_body_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/admin_request_controller_spec.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/controllers/admin_public_body_controller_spec.rb b/spec/controllers/admin_public_body_controller_spec.rb index 3fcc9b36d..c7cf48017 100644 --- a/spec/controllers/admin_public_body_controller_spec.rb +++ b/spec/controllers/admin_public_body_controller_spec.rb @@ -29,7 +29,7 @@ describe AdminPublicBodyController, "when administering public bodies" do it "saves edits to a public body" do public_bodies(:humpadink_public_body).name.should == "Department for Humpadinking" post :update, { :id => 3, :public_body => { :name => "Renamed", :short_name => "", :tag_string => "some tags", :request_email => 'edited@localhost', :last_edit_comment => 'From test code' } } - response.flash[:notice].should include('successful') + request.flash[:notice].should include('successful') pb = PublicBody.find(public_bodies(:humpadink_public_body).id) pb.name.should == "Renamed" end @@ -57,7 +57,7 @@ describe AdminPublicBodyController, "when administering public bodies" do it "mass assigns tags" do n = PublicBody.count post :mass_tag_add, { :new_tag => "department", :table_name => "substring" } - response.flash[:notice].should == "Added tag to table of bodies." + request.flash[:notice].should == "Added tag to table of bodies." response.should redirect_to(:action=>'list') PublicBody.find_by_tag("department").count.should == n end @@ -295,7 +295,7 @@ describe AdminPublicBodyController, "when administering public bodies with i18n" } } } - response.flash[:notice].should include('successful') + request.flash[:notice].should include('successful') end pb = PublicBody.find(public_bodies(:humpadink_public_body).id) diff --git a/spec/controllers/admin_request_controller_spec.rb b/spec/controllers/admin_request_controller_spec.rb index c9d325b03..f644e0146 100644 --- a/spec/controllers/admin_request_controller_spec.rb +++ b/spec/controllers/admin_request_controller_spec.rb @@ -34,7 +34,7 @@ describe AdminRequestController, "when administering requests" do :awaiting_description => false, :allow_new_responses_from => 'anybody', :handle_rejected_responses => 'bounce' } } - response.flash[:notice].should include('successful') + request.flash[:notice].should include('successful') ir = InfoRequest.find(info_requests(:fancy_dog_request).id) ir.title.should == "Renamed" end @@ -59,7 +59,7 @@ describe AdminRequestController, "when administering requests" do it "saves edits to an outgoing_message" do outgoing_messages(:useless_outgoing_message).body.should include("fancy dog") post :update_outgoing, { :id => outgoing_messages(:useless_outgoing_message), :outgoing_message => { :body => "Why do you have such a delicious cat?" } } - response.flash[:notice].should include('successful') + request.flash[:notice].should include('successful') ir = OutgoingMessage.find(outgoing_messages(:useless_outgoing_message).id) ir.body.should include("delicious cat") end @@ -256,7 +256,7 @@ describe AdminRequestController, "when administering the holding pen" do it 'should add a notice to the flash saying that the request has been hidden' do make_request - response.flash[:notice].should == "This external request has been hidden" + request.flash[:notice].should == "This external request has been hidden" end it 'should expire the file cache for the request' do |