diff options
Diffstat (limited to 'spec/models/xapian_spec.rb')
-rw-r--r-- | spec/models/xapian_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb index 79ffc4839..37e68b145 100644 --- a/spec/models/xapian_spec.rb +++ b/spec/models/xapian_spec.rb @@ -35,6 +35,9 @@ end describe PublicBody, " when indexing public bodies with Xapian" do fixtures :public_bodies, :public_body_translations, :incoming_messages, :outgoing_messages, :raw_emails, :comments + before(:each) do + load_raw_emails_data(raw_emails) + end it "should search index the main name field" do rebuild_xapian_index @@ -126,6 +129,9 @@ 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 + before(:each) do + load_raw_emails_data(raw_emails) + end it "should find requests from the user" do rebuild_xapian_index @@ -210,6 +216,9 @@ 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 + before(:each) do + load_raw_emails_data(raw_emails) + end it "should find requests from the user" do rebuild_xapian_index @@ -244,6 +253,9 @@ end describe InfoRequest, " when indexing requests by their title" do fixtures :info_request_events, :info_requests, :incoming_messages, :raw_emails, :comments + before(:each) do + load_raw_emails_data(raw_emails) + end it "should find events for the request" do rebuild_xapian_index @@ -272,6 +284,9 @@ end describe InfoRequest, " when indexing requests by tag" do fixtures :info_request_events, :info_requests, :incoming_messages, :raw_emails, :comments + before(:each) do + load_raw_emails_data(raw_emails) + end it "should find request by tag, even when changes" do rebuild_xapian_index @@ -291,6 +306,9 @@ end describe PublicBody, " when indexing authorities by tag" do fixtures :public_bodies, :public_body_translations, :incoming_messages, :outgoing_messages, :raw_emails, :comments + before(:each) do + load_raw_emails_data(raw_emails) + end it "should find request by tag, even when changes" do rebuild_xapian_index |