aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models/track_thing_spec.rb
diff options
context:
space:
mode:
authorDavid Cabo <david@calibea.com>2012-05-28 12:58:02 +0200
committerDavid Cabo <david@calibea.com>2012-05-28 12:58:02 +0200
commitbc681f7270f5ddc40279981a15a0a7c7af250293 (patch)
tree5df68fe9a0a756d9821c560079271ed363bd3f18 /spec/models/track_thing_spec.rb
parentba29eab41f51f3f489be7c5daf6d28449eab944f (diff)
parentacde8a57e087d3058b8539e04c12e790866f8451 (diff)
Merge branch 'develop' of github.com:sebbacon/alaveteli into develop
Diffstat (limited to 'spec/models/track_thing_spec.rb')
-rw-r--r--spec/models/track_thing_spec.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb
index bd122941a..345629bd6 100644
--- a/spec/models/track_thing_spec.rb
+++ b/spec/models/track_thing_spec.rb
@@ -36,7 +36,7 @@ describe TrackThing, "when tracking changes" do
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'"],
+ ['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
track_thing = TrackThing.create_track_for_search_query(query)
@@ -44,5 +44,10 @@ describe TrackThing, "when tracking changes" do
end
end
+ it "will create an authority-based track when called using a 'bodies' postfix" do
+ track_thing = TrackThing.create_track_for_search_query('fancy dog', 'bodies')
+ track_thing.track_query.should =~ /variety:authority/
+ end
+
end