aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/track_thing.rb2
-rw-r--r--spec/models/track_thing_spec.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb
index 2a1235e11..bdcd87e4f 100644
--- a/app/models/track_thing.rb
+++ b/app/models/track_thing.rb
@@ -175,7 +175,7 @@ class TrackThing < ActiveRecord::Base
query += " variety:sent"
when "users"
query += " variety:user"
- when "authorities"
+ when "bodies"
query += " variety:authority"
end
end
diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb
index 93f407475..345629bd6 100644
--- a/spec/models/track_thing_spec.rb
+++ b/spec/models/track_thing_spec.rb
@@ -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