diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-10-25 17:18:49 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-10-25 17:18:49 +0100 |
commit | 46c160d3b7b121ccda404c56e2cc54f48b16703d (patch) | |
tree | 94cc8a80d303022d51d200117c7a3d081ee1f411 /spec/models/track_thing_spec.rb | |
parent | b45be1d0523e488998434603923585989e27ce1d (diff) | |
parent | 6e5656ba88210300aa0c1223dc459199b7fa4c33 (diff) |
Merge remote-tracking branch 'openaustralia_github/follow-all-requests-description' into develop
Diffstat (limited to 'spec/models/track_thing_spec.rb')
-rw-r--r-- | spec/models/track_thing_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb index 345629bd6..c42eb5e8b 100644 --- a/spec/models/track_thing_spec.rb +++ b/spec/models/track_thing_spec.rb @@ -35,10 +35,11 @@ describe TrackThing, "when tracking changes" do end it "will make some sane descriptions of search-based tracks" do - tests = [['bob variety:user', "users matching text 'bob'"], - ['bob (variety:sent OR variety:followup_sent OR variety:response OR variety:comment) (latest_status:successful OR latest_status:partially_successful OR latest_status:rejected OR latest_status:not_held)', "comments or requests which are successful or unsuccessful matching text 'bob'"], - ['(latest_status:waiting_response OR latest_status:waiting_clarification OR waiting_classification:true)', 'requests which are awaiting a response']] - for query, description in tests + tests = { 'bob variety:user' => "users matching text 'bob'", + 'bob (variety:sent OR variety:followup_sent OR variety:response OR variety:comment) (latest_status:successful OR latest_status:partially_successful OR latest_status:rejected OR latest_status:not_held)' => "comments or requests which are successful or unsuccessful matching text 'bob'", + '(latest_status:waiting_response OR latest_status:waiting_clarification OR waiting_classification:true)' => 'requests which are awaiting a response', + ' (variety:sent OR variety:followup_sent OR variety:response OR variety:comment)' => 'all requests or comments' } + tests.each do |query, description| track_thing = TrackThing.create_track_for_search_query(query) track_thing.track_query_description.should == description end |