diff options
author | Matthew Landauer <matthew@openaustralia.org> | 2013-04-15 14:23:51 +1000 |
---|---|---|
committer | Matthew Landauer <matthew@openaustralia.org> | 2013-04-15 14:23:51 +1000 |
commit | 3eac44240aa178aeec1774dc257c956b79cc49bf (patch) | |
tree | bf86d47d95b73c4d726678eed4cea195dad4c6d4 /spec/models/info_request_spec.rb | |
parent | 183b4f4b67d0f282c43d999bd18e65abca11b41e (diff) |
Check event_type in tests
Diffstat (limited to 'spec/models/info_request_spec.rb')
-rw-r--r-- | spec/models/info_request_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb index adf942518..eb4fb38c1 100644 --- a/spec/models/info_request_spec.rb +++ b/spec/models/info_request_spec.rb @@ -596,8 +596,10 @@ describe InfoRequest do request.info_request_events.count.should == 2 event1, event2 = request.info_request_events + event1.event_type.should == "sent" event1.described_state.should == "waiting_response" event1.calculated_state.should == "waiting_response" + event2.event_type.should == "response" event2.described_state.should be_nil # TODO: Should calculated_status in this situation be "waiting_classification"? # This would allow searches like "latest_status: waiting_classification" to be @@ -618,8 +620,10 @@ describe InfoRequest do request.info_request_events.count.should == 2 event1, event2 = request.info_request_events + event1.event_type.should == "sent" event1.described_state.should == "waiting_response" event1.calculated_state.should == "waiting_response" + event2.event_type.should == "response" event2.described_state.should == "waiting_response" event2.calculated_state.should == "waiting_response" end @@ -640,10 +644,13 @@ describe InfoRequest do request.info_request_events.count.should == 3 event1, event2, event3 = request.info_request_events + event1.event_type.should == "sent" event1.described_state.should == "waiting_response" event1.calculated_state.should == "waiting_response" + event2.event_type.should == "response" event2.described_state.should == "waiting_response" event2.calculated_state.should == "waiting_response" + event3.event_type.should == "followup_sent" event3.described_state.should == "waiting_response" event3.calculated_state.should == "waiting_response" end |