From 38d34a25f74a71621f1b5823a148032cfcba7fba Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Wed, 7 Aug 2013 16:55:11 +0100 Subject: Set the calculated state on external requests. Set to 'waiting_response' on creation, to match the displayed state. --- spec/controllers/api_controller_spec.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'spec/controllers/api_controller_spec.rb') diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index 66b8e33f0..8e9d17fbe 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -83,6 +83,9 @@ describe ApiController, "when using the API" do new_request.last_event_forming_initial_request.outgoing_message.body.should == request_data["body"].strip new_request.public_body_id.should == public_bodies(:geraldine_public_body).id + new_request.info_request_events.size.should == 1 + new_request.info_request_events[0].event_type.should == 'sent' + new_request.info_request_events[0].calculated_state.should == 'waiting_response' end def _create_request -- cgit v1.2.3