From 81090b8eb2d8d24072807062ccd5f32c8074069e Mon Sep 17 00:00:00 2001 From: Matthew Landauer Date: Sat, 20 Apr 2013 10:38:49 +1000 Subject: Now record a state_update event *whenever* a user classifies a request --- spec/controllers/request_controller_spec.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'spec/controllers/request_controller_spec.rb') diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 4161f1118..4e889e2a6 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1440,8 +1440,8 @@ describe RequestController, "when classifying an information request" do post_status('rejected') end - it 'should not log a status update event' do - @dog_request.should_not_receive(:log_event) + it 'should log a status update event' do + @dog_request.should_receive(:log_event) post_status('rejected') end @@ -1494,11 +1494,12 @@ describe RequestController, "when classifying an information request" do @dog_request.awaiting_description.should == false @dog_request.described_state.should == 'rejected' @dog_request.get_last_response_event.should == info_request_events(:useless_incoming_message_event) - @dog_request.get_last_response_event.calculated_state.should == 'rejected' + @dog_request.info_request_events.last.event_type.should == "status_update" + @dog_request.info_request_events.last.calculated_state.should == 'rejected' end - it 'should not log a status update event' do - @dog_request.should_not_receive(:log_event) + it 'should log a status update event' do + @dog_request.should_receive(:log_event) post_status('rejected') end -- cgit v1.2.3 From 9fe48c5b9db1c0ba6c1a59f0d092c88e5cae1aa0 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Thu, 18 Jul 2013 15:33:05 +0100 Subject: Switch routing-filter (which takes locale out of the params and puts it in the URL) off by default in model, controller, and helper tests. This means we can supply the locale as a param. Turn it on specifically for a couple of controller tests that test routing, and change other url localization tests into integration tests. --- spec/controllers/request_controller_spec.rb | 4 ---- 1 file changed, 4 deletions(-) (limited to 'spec/controllers/request_controller_spec.rb') diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index c73576c50..73d1849ea 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -1645,10 +1645,6 @@ describe RequestController, "when classifying an information request" do @dog_request = info_requests(:fancy_dog_request) @dog_request.stub!(:each).and_return([@dog_request]) InfoRequest.stub!(:find).and_return(@dog_request) - RoutingFilter.active = false - end - after do - RoutingFilter.active = true end def request_url -- cgit v1.2.3