diff options
Diffstat (limited to 'spec/controllers/track_controller_spec.rb')
-rw-r--r-- | spec/controllers/track_controller_spec.rb | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb index 7daa23769..5505afe59 100644 --- a/spec/controllers/track_controller_spec.rb +++ b/spec/controllers/track_controller_spec.rb @@ -38,7 +38,7 @@ describe TrackController, "when making a new track on a request" do get :track_request, :url_title => @ir.url_title, :feed => 'track' response.should redirect_to(:controller => 'request', :action => 'show', :url_title => @ir.url_title) end - + it "should 404 for non-existent requests" do session[:user_id] = @user.id lambda { @@ -57,13 +57,12 @@ end describe TrackController, "when sending alerts for a track" do integrate_views - include LinkToHelper # for main_url before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end - + it "should send alerts" do # Don't do clever locale-insertion-unto-URL stuff old_filters = ActionController::Routing::Routes.filters @@ -105,7 +104,7 @@ describe TrackController, "when sending alerts for a track" do # Given we can't click the link, check the token is right instead post_redirect = PostRedirect.find_by_email_token(mail_token) - expected_url = main_url("/user/" + users(:silly_name_user).url_name + "#email_subscriptions") # XXX can't call URL making functions here, what is correct way to do this? + expected_url = show_user_url(:url_name => users(:silly_name_user).url_name, :anchor => "email_subscriptions") post_redirect.uri.should == expected_url # Check nothing more is delivered if we try again @@ -138,7 +137,7 @@ describe TrackController, "when viewing RSS feed for a track" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should get the RSS feed" do @@ -168,7 +167,7 @@ describe TrackController, "when viewing JSON version of a track feed" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end it "should get the feed" do @@ -210,9 +209,9 @@ describe TrackController, "when tracking a public body" do before(:each) do load_raw_emails_data - rebuild_xapian_index + get_fixtures_xapian_index end - + it "should work" do geraldine = public_bodies(:geraldine_public_body) get :track_public_body, :feed => 'feed', :url_name => geraldine.url_name |