diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-01 17:52:14 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-01 17:52:14 +0100 |
commit | 19c63da981d6348f9f7b8c8f814319697be1e0c6 (patch) | |
tree | 9125366675aa3971e5b05bc1df199528dfe111ab /spec/models/track_thing_spec.rb | |
parent | 5162e119b7fa0a4475585447f9fe61ffc8093249 (diff) |
Make custom track queries have readable names. Closes #169.
Diffstat (limited to 'spec/models/track_thing_spec.rb')
-rw-r--r-- | spec/models/track_thing_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb index 6b9cd6d4a..1a0324a78 100644 --- a/spec/models/track_thing_spec.rb +++ b/spec/models/track_thing_spec.rb @@ -28,5 +28,15 @@ describe TrackThing, "when tracking changes" do found_track.should == @track_thing 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)', "requests which are successful or unsuccessful or comments 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 + track_thing = TrackThing.create_track_for_search_query(query) + track_thing.track_query_description.should == description + end + end + end |