aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/track_thing_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2014-05-15 17:01:22 +0100
committerLouise Crow <louise.crow@gmail.com>2014-05-15 17:01:22 +0100
commitbb5f95040d377d86629012347343fbf2c7dda016 (patch)
treebe696ec2615b098db34449a982fcb09a68c9c49b /spec/models/track_thing_spec.rb
parent6d215fba5cc709c43f12f86da39a643e4be5922b (diff)
parent21027d0d1197e7ac447296ab68a25159860888b2 (diff)
Merge remote-tracking branch 'origin/release/0.18'0.18
Diffstat (limited to 'spec/models/track_thing_spec.rb')
-rw-r--r--spec/models/track_thing_spec.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb
index 1c582564b..3edf2d1ad 100644
--- a/spec/models/track_thing_spec.rb
+++ b/spec/models/track_thing_spec.rb
@@ -51,10 +51,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',
- ' (variety:sent OR variety:followup_sent OR variety:response OR variety:comment)' => 'all requests or comments' }
+ tests = { ' (variety:sent OR variety:followup_sent OR variety:response OR variety:comment)' => 'all requests or comments',
+ 'bob (variety:sent OR variety:followup_sent OR variety:response OR variety:comment)' => "all requests or comments matching text 'bob'",
+ 'bob (latest_status:successful OR latest_status:partially_successful)' => "requests which are successful matching text 'bob'",
+ '(latest_status:successful OR latest_status:partially_successful)' => 'requests which are successful',
+ 'bob' => "anything matching text 'bob'" }
tests.each do |query, description|
track_thing = TrackThing.create_track_for_search_query(query)
track_thing.track_query_description.should == description