diff options
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/general_controller_spec.rb | 2 | ||||
-rw-r--r-- | spec/controllers/request_controller_spec.rb | 6 | ||||
-rw-r--r-- | spec/controllers/track_controller_spec.rb | 11 |
3 files changed, 10 insertions, 9 deletions
diff --git a/spec/controllers/general_controller_spec.rb b/spec/controllers/general_controller_spec.rb index abc63c290..f0ab38f38 100644 --- a/spec/controllers/general_controller_spec.rb +++ b/spec/controllers/general_controller_spec.rb @@ -7,7 +7,7 @@ end describe GeneralController, "when searching" do integrate_views - fixtures :users, :outgoing_messages, :incoming_messages, :info_requests, :info_request_events, :public_bodies + fixtures :users, :outgoing_messages, :incoming_messages, :info_requests, :info_request_events, :public_bodies, :comments before do # XXX - what is proper way to do this only once? diff --git a/spec/controllers/request_controller_spec.rb b/spec/controllers/request_controller_spec.rb index 59ce51efa..cd6183fe7 100644 --- a/spec/controllers/request_controller_spec.rb +++ b/spec/controllers/request_controller_spec.rb @@ -212,7 +212,7 @@ end describe RequestController, "when viewing an individual response" do integrate_views - fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages # all needed as integrating views + fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages, :comments # all needed as integrating views it "should show the response" do get :show_response, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message) @@ -222,7 +222,7 @@ end describe RequestController, "when classifying an individual response" do integrate_views - fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages # all needed as integrating views + fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages, :comments # all needed as integrating views it "should require login" do post :describe_state, :incoming_message => { :described_state => "rejected" }, :id => info_requests(:fancy_dog_request).id, :incoming_message_id => incoming_messages(:useless_incoming_message), :last_info_request_event_id => info_request_events(:useless_incoming_message_event).id, :submitted_describe_state => 1 @@ -333,7 +333,7 @@ end describe RequestController, "sending unclassified new response reminder alerts" do integrate_views - fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages # all needed as integrating views + fixtures :info_requests, :info_request_events, :public_bodies, :users, :incoming_messages, :outgoing_messages, :comments # all needed as integrating views it "should send an alert" do RequestMailer.alert_new_response_reminders diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb index 21b9c2e7c..ce3528812 100644 --- a/spec/controllers/track_controller_spec.rb +++ b/spec/controllers/track_controller_spec.rb @@ -58,7 +58,7 @@ 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 + fixtures :info_requests, :outgoing_messages, :incoming_messages, :info_request_events, :users, :track_things, :comments, :public_bodies it "should get the RSS feed" do track_thing = track_things(:track_fancy_dog_request) @@ -67,10 +67,11 @@ describe TrackController, "when viewing RSS feed for a track" do 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) + assigns[:xapian_object].matches_estimated.should == 3 + assigns[:xapian_object].results.size.should == 3 + assigns[:xapian_object].results[0][:model].should == info_request_events(:silly_comment_event) + assigns[:xapian_object].results[1][:model].should == info_request_events(:useless_incoming_message_event) + assigns[:xapian_object].results[2][:model].should == info_request_events(:useless_outgoing_message_event) end end |