diff options
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/has_tag_string_tag_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/incoming_message_spec.rb | 30 | ||||
-rw-r--r-- | spec/models/info_request_spec.rb | 14 | ||||
-rw-r--r-- | spec/models/outgoing_mailer_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/outgoing_message_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/public_body_spec.rb | 40 | ||||
-rw-r--r-- | spec/models/request_mailer_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/track_thing_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 14 | ||||
-rw-r--r-- | spec/models/xapian_spec.rb | 17 |
10 files changed, 81 insertions, 48 deletions
diff --git a/spec/models/has_tag_string_tag_spec.rb b/spec/models/has_tag_string_tag_spec.rb index ba439acb8..1acd2e27d 100644 --- a/spec/models/has_tag_string_tag_spec.rb +++ b/spec/models/has_tag_string_tag_spec.rb @@ -1,7 +1,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe HasTagString::HasTagStringTag, " when fiddling with tag strings " do - fixtures :public_bodies, :public_body_translations + fixtures :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things it "should be able to make a new tag and save it" do @tag = HasTagString::HasTagStringTag.new diff --git a/spec/models/incoming_message_spec.rb b/spec/models/incoming_message_spec.rb index d6923da21..1a4baca0b 100644 --- a/spec/models/incoming_message_spec.rb +++ b/spec/models/incoming_message_spec.rb @@ -1,7 +1,8 @@ +# coding: utf-8 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe IncomingMessage, " when dealing with incoming mail" do - fixtures :incoming_messages, :raw_emails, :info_requests + fixtures :users, :raw_emails, :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do @im = incoming_messages(:useless_incoming_message) @@ -17,6 +18,27 @@ describe IncomingMessage, " when dealing with incoming mail" do TMail::Address.parse(em) end + it "should correctly fold various types of footer" do + Dir.glob(File.join(Spec::Runner.configuration.fixture_path, "files", "email-folding-example-*.txt")).each do |file| + message = File.read(file) + parsed = IncomingMessage.remove_quoted_sections(message) + expected = File.read("#{file}.expected") + parsed.should include(expected) + end + end + + it "should fold multiline sections" do + { + "foo\n--------\nconfidential" => "foo\nFOLDED_QUOTED_SECTION\n", # basic test + "foo\n--------\nbar - confidential" => "foo\nFOLDED_QUOTED_SECTION\n", # allow scorechar inside folded section + "foo\n--------\nbar\n--------\nconfidential" => "foo\n--------\nbar\nFOLDED_QUOTED_SECTION\n", # don't assume that anything after a score is a folded section + "foo\n--------\nbar\n--------\nconfidential\n--------\nrest" => "foo\n--------\nbar\nFOLDED_QUOTED_SECTION\nrest", # don't assume that a folded section continues to the end of the message + "foo\n--------\nbar\n- - - - - - - -\nconfidential\n--------\nrest" => "foo\n--------\nbar\nFOLDED_QUOTED_SECTION\nrest", # allow spaces in the score + }.each do |input,output| + IncomingMessage.remove_quoted_sections(input).should == output + end + end + end describe IncomingMessage, "when parsing HTML mail" do @@ -139,7 +161,7 @@ describe IncomingMessage, " checking validity to reply to" do end describe IncomingMessage, " checking validity to reply to with real emails" do - fixtures :incoming_messages, :raw_emails, :public_bodies, :public_body_translations, :info_requests, :users + fixtures :users, :raw_emails, :public_bodies, :public_body_translations, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things after(:all) do ActionMailer::Base.deliveries.clear @@ -163,7 +185,7 @@ describe IncomingMessage, " checking validity to reply to with real emails" do end describe IncomingMessage, " when censoring data" do - fixtures :incoming_messages, :raw_emails, :public_bodies, :public_body_translations, :info_requests, :users + fixtures :users, :raw_emails, :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do @test_data = "There was a mouse called Stilton, he wished that he was blue." @@ -273,7 +295,7 @@ describe IncomingMessage, " when censoring data" do end describe IncomingMessage, " when censoring whole users" do - fixtures :incoming_messages, :raw_emails, :public_bodies, :public_body_translations, :info_requests, :users + fixtures :users, :raw_emails, :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do @test_data = "There was a mouse called Stilton, he wished that he was blue." diff --git a/spec/models/info_request_spec.rb b/spec/models/info_request_spec.rb index b82052a0f..409d48ede 100644 --- a/spec/models/info_request_spec.rb +++ b/spec/models/info_request_spec.rb @@ -3,7 +3,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe InfoRequest do describe "guessing a request from an email" do - fixtures :info_requests, :public_bodies, :incoming_messages, :raw_emails + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do @im = incoming_messages(:useless_incoming_message) @@ -74,7 +74,7 @@ describe InfoRequest do describe " when emailing" do - fixtures :info_requests, :info_request_events, :outgoing_messages, :public_bodies, :public_body_translations, :users, :comments + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @info_request = info_requests(:fancy_dog_request) @@ -154,7 +154,7 @@ describe InfoRequest do end describe "when calculating the status" do - fixtures :info_requests, :info_request_events, :holidays, :public_bodies, :public_body_translations, :outgoing_messages + fixtures :holidays, :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @ir = info_requests(:naughty_chicken_request) @@ -196,7 +196,7 @@ describe InfoRequest do describe "when using a plugin and calculating the status" do - fixtures :info_requests + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do InfoRequest.send(:require, File.expand_path(File.dirname(__FILE__) + '/customstates')) @@ -231,7 +231,7 @@ describe InfoRequest do describe "when calculating the status for a school" do - fixtures :info_requests, :info_request_events, :holidays, :public_bodies, :public_body_translations + fixtures :holidays, :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @ir = info_requests(:naughty_chicken_request) @@ -380,8 +380,8 @@ describe InfoRequest do before do Time.stub!(:now).and_return(Time.utc(2007, 11, 9, 23, 59)) - @mock_comment_event = mock_model(InfoRequestEvent, :created_at => Time.now - 23.days, :event_type => 'comment') - @mock_response_event = mock_model(InfoRequestEvent, :created_at => Time.now - 22.days, :event_type => 'response') + @mock_comment_event = safe_mock_model(InfoRequestEvent, :created_at => Time.now - 23.days, :event_type => 'comment') + @mock_response_event = safe_mock_model(InfoRequestEvent, :created_at => Time.now - 22.days, :event_type => 'response') @info_request = InfoRequest.new(:prominence => 'normal', :awaiting_description => true, :info_request_events => [@mock_response_event, @mock_comment_event]) diff --git a/spec/models/outgoing_mailer_spec.rb b/spec/models/outgoing_mailer_spec.rb index c96a3fb74..75c8053b4 100644 --- a/spec/models/outgoing_mailer_spec.rb +++ b/spec/models/outgoing_mailer_spec.rb @@ -4,7 +4,7 @@ describe OutgoingMailer, " when working out follow up addresses" do # This is done with fixtures as the code is a bit tangled with the way it # calls TMail. XXX untangle it and make these tests spread out and using # mocks. Put parts of the tests in spec/lib/tmail_extensions.rb - fixtures :info_requests, :incoming_messages, :raw_emails, :public_bodies, :public_body_translations + fixtures :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end @@ -70,7 +70,7 @@ describe OutgoingMailer, " when working out follow up addresses" do end describe OutgoingMailer, "when working out follow up subjects" do - fixtures :info_requests, :incoming_messages, :outgoing_messages, :raw_emails + fixtures :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) diff --git a/spec/models/outgoing_message_spec.rb b/spec/models/outgoing_message_spec.rb index 1956c4d73..58d9f398e 100644 --- a/spec/models/outgoing_message_spec.rb +++ b/spec/models/outgoing_message_spec.rb @@ -1,7 +1,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe OutgoingMessage, " when making an outgoing message" do - fixtures :outgoing_messages, :info_requests, :incoming_messages, :public_bodies, :public_body_translations + fixtures :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @om = outgoing_messages(:useless_outgoing_message) @@ -38,7 +38,7 @@ end describe IncomingMessage, " when censoring data" do - fixtures :outgoing_messages, :info_requests + fixtures :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @om = outgoing_messages(:useless_outgoing_message) diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index 33ab8ffdb..07e8f291d 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -95,7 +95,7 @@ describe PublicBody, " using machine tags" do end describe PublicBody, "when finding_by_tags" do - fixtures :public_bodies, :public_body_translations + fixtures :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @geraldine = public_bodies(:geraldine_public_body) @@ -173,7 +173,7 @@ describe PublicBody, " when saving" do end describe PublicBody, "when searching" do - fixtures :public_bodies, :public_body_translations, :public_body_versions + fixtures :public_bodies, :public_body_translations, :public_body_versions, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things it "should find by existing url name" do body = PublicBody.find_by_url_name_with_historic('dfh') @@ -226,6 +226,18 @@ describe PublicBody, "when searching" do end end +describe PublicBody, " when dealing public body locales" do + it "shouldn't fail if it internal_admin_body was created in a locale other than the default" do + # first time, do it with the non-default locale + PublicBody.with_locale(:es) do + PublicBody.internal_admin_body + end + + # second time + lambda {PublicBody.internal_admin_body }.should_not raise_error(ActiveRecord::RecordInvalid) + end +end + describe PublicBody, " when loading CSV files" do before(:each) do # InternalBody is created the first time it's accessed, which happens sometimes during imports, @@ -302,8 +314,8 @@ describe PublicBody, " when loading CSV files" do notes.size.should == 4 notes.should == [ "line 2: creating new authority 'North West Fake Authority' (locale: en):\n\t\{\"name\":\"North West Fake Authority\",\"request_email\":\"north_west_foi@localhost\",\"home_page\":\"http://northwest.org\"\}", - "line 3: creating new authority 'Scottish Fake Authority' (locale: en):\n\t\{\"tag_string\":\"scottish\",\"name\":\"Scottish Fake Authority\",\"request_email\":\"scottish_foi@localhost\",\"home_page\":\"http://scottish.org\"\}", - "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: en):\n\t\{\"tag_string\":\"fake aTag\",\"name\":\"Fake Authority of Northern Ireland\",\"request_email\":\"ni_foi@localhost\"\}", + "line 3: creating new authority 'Scottish Fake Authority' (locale: en):\n\t\{\"name\":\"Scottish Fake Authority\",\"request_email\":\"scottish_foi@localhost\",\"home_page\":\"http://scottish.org\",\"tag_string\":\"scottish\"\}", + "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: en):\n\t\{\"name\":\"Fake Authority of Northern Ireland\",\"request_email\":\"ni_foi@localhost\",\"tag_string\":\"fake aTag\"\}", "Notes: Some bodies are in database, but not in CSV file:\n Department for Humpadinking\n Geraldine Quango\nYou may want to delete them manually.\n" ] @@ -316,7 +328,7 @@ describe PublicBody, " when loading CSV files" do PublicBody.find_by_name('North West Fake Authority').tag_array_for_search.should == [] PublicBody.find_by_name('Scottish Fake Authority').tag_array_for_search.should == ['scottish'] - PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['fake', 'aTag'] + PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['aTag', 'fake'] # Import again to check the 'add' tag functionality works new_tags_file = load_file_fixture('fake-authority-add-tags.rb') @@ -324,8 +336,8 @@ describe PublicBody, " when loading CSV files" do # Check tags were added successfully PublicBody.find_by_name('North West Fake Authority').tag_array_for_search.should == ['aTag'] - PublicBody.find_by_name('Scottish Fake Authority').tag_array_for_search.should == ['scottish', 'aTag'] - PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['fake', 'aTag'] + PublicBody.find_by_name('Scottish Fake Authority').tag_array_for_search.should == ['aTag', 'scottish'] + PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['aTag', 'fake'] end it "should import tags successfully when the import tag is set" do @@ -334,8 +346,8 @@ describe PublicBody, " when loading CSV files" do # Check new bodies were imported successfully PublicBody.find_by_name('North West Fake Authority').tag_array_for_search.should == ['fake'] - PublicBody.find_by_name('Scottish Fake Authority').tag_array_for_search.should == ['scottish', 'fake'] - PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['fake', 'aTag'] + PublicBody.find_by_name('Scottish Fake Authority').tag_array_for_search.should == ['fake', 'scottish'] + PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['aTag', 'fake'] # Import again to check the 'replace' tag functionality works new_tags_file = load_file_fixture('fake-authority-add-tags.rb') @@ -344,7 +356,7 @@ describe PublicBody, " when loading CSV files" do # Check tags were added successfully PublicBody.find_by_name('North West Fake Authority').tag_array_for_search.should == ['aTag'] PublicBody.find_by_name('Scottish Fake Authority').tag_array_for_search.should == ['aTag'] - PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['fake', 'aTag'] + PublicBody.find_by_name('Fake Authority of Northern Ireland').tag_array_for_search.should == ['aTag', 'fake'] end it "should create bodies with names in multiple locales" do @@ -357,9 +369,9 @@ describe PublicBody, " when loading CSV files" do notes.should == [ "line 2: creating new authority 'North West Fake Authority' (locale: en):\n\t{\"name\":\"North West Fake Authority\",\"request_email\":\"north_west_foi@localhost\",\"home_page\":\"http://northwest.org\"}", "line 2: creating new authority 'North West Fake Authority' (locale: es):\n\t{\"name\":\"Autoridad del Nordeste\"}", - "line 3: creating new authority 'Scottish Fake Authority' (locale: en):\n\t{\"tag_string\":\"scottish\",\"name\":\"Scottish Fake Authority\",\"request_email\":\"scottish_foi@localhost\",\"home_page\":\"http://scottish.org\"}", + "line 3: creating new authority 'Scottish Fake Authority' (locale: en):\n\t{\"name\":\"Scottish Fake Authority\",\"request_email\":\"scottish_foi@localhost\",\"home_page\":\"http://scottish.org\",\"tag_string\":\"scottish\"}", "line 3: creating new authority 'Scottish Fake Authority' (locale: es):\n\t{\"name\":\"Autoridad Escocesa\"}", - "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: en):\n\t{\"tag_string\":\"fake aTag\",\"name\":\"Fake Authority of Northern Ireland\",\"request_email\":\"ni_foi@localhost\"}", + "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: en):\n\t{\"name\":\"Fake Authority of Northern Ireland\",\"request_email\":\"ni_foi@localhost\",\"tag_string\":\"fake aTag\"}", "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: es):\n\t{\"name\":\"Autoridad Irlandesa\"}", "Notes: Some bodies are in database, but not in CSV file:\n Department for Humpadinking\n Geraldine Quango\nYou may want to delete them manually.\n" ] @@ -385,8 +397,8 @@ describe PublicBody, " when loading CSV files" do notes.size.should == 4 notes.should == [ "line 2: creating new authority 'North West Fake Authority' (locale: en):\n\t{\"name\":\"North West Fake Authority\",\"request_email\":\"north_west_foi@localhost\",\"home_page\":\"http://northwest.org\"}", - "line 3: creating new authority 'Scottish Fake Authority' (locale: en):\n\t{\"tag_string\":\"scottish\",\"name\":\"Scottish Fake Authority\",\"request_email\":\"scottish_foi@localhost\",\"home_page\":\"http://scottish.org\"}", - "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: en):\n\t{\"tag_string\":\"fake aTag\",\"name\":\"Fake Authority of Northern Ireland\",\"request_email\":\"ni_foi@localhost\"}", + "line 3: creating new authority 'Scottish Fake Authority' (locale: en):\n\t{\"name\":\"Scottish Fake Authority\",\"request_email\":\"scottish_foi@localhost\",\"home_page\":\"http://scottish.org\",\"tag_string\":\"scottish\"}", + "line 4: creating new authority 'Fake Authority of Northern Ireland' (locale: en):\n\t{\"name\":\"Fake Authority of Northern Ireland\",\"request_email\":\"ni_foi@localhost\",\"tag_string\":\"fake aTag\"}", "Notes: Some bodies are in database, but not in CSV file:\n Department for Humpadinking\n Geraldine Quango\nYou may want to delete them manually.\n" ] diff --git a/spec/models/request_mailer_spec.rb b/spec/models/request_mailer_spec.rb index fbe22c220..ef4ed8074 100644 --- a/spec/models/request_mailer_spec.rb +++ b/spec/models/request_mailer_spec.rb @@ -1,7 +1,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe RequestMailer, " when receiving incoming mail" do - fixtures :info_requests, :incoming_messages, :raw_emails, :users, :public_bodies, :public_body_translations + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end diff --git a/spec/models/track_thing_spec.rb b/spec/models/track_thing_spec.rb index 1a0324a78..4922a96c7 100644 --- a/spec/models/track_thing_spec.rb +++ b/spec/models/track_thing_spec.rb @@ -1,7 +1,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe TrackThing, "when tracking changes" do - fixtures :track_things, :users + fixtures :users, :info_requests, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @track_thing = track_things(:track_fancy_dog_search) diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 751a61060..e0a6c649e 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -152,10 +152,10 @@ end describe User, "when reindexing referencing models" do before do - @request_event = mock_model(InfoRequestEvent, :xapian_mark_needs_index => true) - @request = mock_model(InfoRequest, :info_request_events => [@request_event]) - @comment_event = mock_model(InfoRequestEvent, :xapian_mark_needs_index => true) - @comment = mock_model(Comment, :info_request_events => [@comment_event]) + @request_event = safe_mock_model(InfoRequestEvent, :xapian_mark_needs_index => true) + @request = safe_mock_model(InfoRequest, :info_request_events => [@request_event]) + @comment_event = safe_mock_model(InfoRequestEvent, :xapian_mark_needs_index => true) + @comment = safe_mock_model(Comment, :info_request_events => [@comment_event]) @user = User.new(:comments => [@comment], :info_requests => [@request]) end @@ -193,7 +193,7 @@ describe User, "when reindexing referencing models" do end describe User, "when checking abilities" do - fixtures :users + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @user = users(:bob_smith_user) @@ -283,7 +283,7 @@ describe User, "when setting a profile photo" do end describe User, "when unconfirmed" do - fixtures :users + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before do @user = users(:unconfirmed_user) @@ -295,7 +295,7 @@ describe User, "when unconfirmed" do end describe User, "when emails have bounced" do - fixtures :users + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things it "should record bounces" do User.record_bounce_for_email("bob@localhost", "The reason we think the email bounced (e.g. a bounce message)") diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb index 0c6fa6bb6..932966dfb 100644 --- a/spec/models/xapian_spec.rb +++ b/spec/models/xapian_spec.rb @@ -1,7 +1,7 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') describe User, " when indexing users with Xapian" do - fixtures :users + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things it "should search by name" do rebuild_xapian_index @@ -14,7 +14,6 @@ describe User, " when indexing users with Xapian" do it "should search by 'about me' text" do user = users(:bob_smith_user) - rebuild_xapian_index # def InfoRequest.full_search(models, query, order, ascending, collapse, per_page, page) xapian_object = InfoRequest.full_search([User], "stuff", 'created_at', true, nil, 100, 1) xapian_object.results.size.should == 1 @@ -34,7 +33,7 @@ describe User, " when indexing users with Xapian" do end describe PublicBody, " when indexing public bodies with Xapian" do - fixtures :public_bodies, :public_body_translations, :incoming_messages, :outgoing_messages, :raw_emails, :comments, :info_requests + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end @@ -72,7 +71,7 @@ describe PublicBody, " when indexing public bodies with Xapian" do end describe PublicBody, " when indexing requests by body they are to" do - fixtures :public_bodies, :public_body_translations, :info_request_events, :info_requests, :raw_emails, :comments + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) @@ -132,7 +131,7 @@ describe PublicBody, " when indexing requests by body they are to" do end describe User, " when indexing requests by user they are from" do - fixtures :users, :info_request_events, :info_requests, :incoming_messages, :outgoing_messages, :raw_emails, :comments + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end @@ -219,7 +218,7 @@ describe User, " when indexing requests by user they are from" do end describe User, " when indexing comments by user they are by" do - fixtures :users, :info_request_events, :info_requests, :comments, :incoming_messages, :outgoing_messages, :raw_emails, :comments + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end @@ -256,7 +255,7 @@ describe User, " when indexing comments by user they are by" do end describe InfoRequest, " when indexing requests by their title" do - fixtures :info_request_events, :info_requests, :incoming_messages, :raw_emails, :comments + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end @@ -287,7 +286,7 @@ describe InfoRequest, " when indexing requests by their title" do end describe InfoRequest, " when indexing requests by tag" do - fixtures :info_request_events, :info_requests, :incoming_messages, :raw_emails, :comments + fixtures :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end @@ -309,7 +308,7 @@ describe InfoRequest, " when indexing requests by tag" do end describe PublicBody, " when indexing authorities by tag" do - fixtures :public_bodies, :public_body_translations, :incoming_messages, :outgoing_messages, :raw_emails, :comments + fixtures :public_bodies, :public_body_translations, :public_body_versions, :users, :info_requests, :raw_emails, :incoming_messages, :outgoing_messages, :comments, :info_request_events, :track_things before(:each) do load_raw_emails_data(raw_emails) end |