diff options
author | francis <francis> | 2008-08-09 01:12:42 +0000 |
---|---|---|
committer | francis <francis> | 2008-08-09 01:12:42 +0000 |
commit | 7276e1968f66755a9bf1d29d536a1a1dbe5528a4 (patch) | |
tree | 0a6f342c90f810c22ad605cdbc3c56527a1b5204 /spec/controllers/track_controller_spec.rb | |
parent | 25a4d44b61d103c9543392f362571248cc418d62 (diff) |
Basic test of RSS feed
Diffstat (limited to 'spec/controllers/track_controller_spec.rb')
-rw-r--r-- | spec/controllers/track_controller_spec.rb | 19 |
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 + |