aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/track_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2012-11-21 18:51:05 +0000
committerLouise Crow <louise.crow@gmail.com>2012-11-21 18:51:05 +0000
commit640aa149fd321658a33466df7b53947b78bccd81 (patch)
tree502d2c316d9c9addd509f4ae6f3d47a96173ceca /spec/controllers/track_controller_spec.rb
parentffbd12d868eb1803631194b5b4e4ffbb3ac0d812 (diff)
Use new function that copies existing xapian index in spec setup where a clean copy of the xapian index with fixtures loaded is required.
Diffstat (limited to 'spec/controllers/track_controller_spec.rb')
-rw-r--r--spec/controllers/track_controller_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/track_controller_spec.rb b/spec/controllers/track_controller_spec.rb
index 7daa23769..c785960b5 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 {
@@ -61,9 +61,9 @@ describe TrackController, "when sending alerts for a track" do
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
@@ -138,7 +138,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 +168,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 +210,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