aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/controllers/track_controller_spec.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb
index 074d63b39..21b9c2e7c 100644
--- a/spec/controllers/track_controller_spec.rb
+++ b/spec/controllers/track_controller_spec.rb
@@ -56,4 +56,23 @@ describe TrackController, "when sending alerts for a track" do
end
+describe TrackController, "when viewing RSS feed for a track" do
+ integrate_views
+ fixtures :info_requests, :outgoing_messages, :incoming_messages, :info_request_events, :users, :track_things
+
+ it "should get the RSS feed" do
+ track_thing = track_things(:track_fancy_dog_request)
+
+ get :track_request, :feed => 'feed', :url_title => track_thing.info_request.url_title
+ response.should render_template('track/atom_feed')
+ # XXX should check it is an atom.builder type being rendered, not sure how to
+
+ assigns[:xapian_object].matches_estimated.should == 2
+ assigns[:xapian_object].results.size.should == 2
+ assigns[:xapian_object].results[0][:model].should == info_request_events(:useless_incoming_message_event)
+ assigns[:xapian_object].results[1][:model].should == info_request_events(:useless_outgoing_message_event)
+ end
+
+end
+