aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Houston <robin.houston@gmail.com>2012-06-07 21:53:08 +0100
committerRobin Houston <robin.houston@gmail.com>2012-06-07 21:53:08 +0100
commit428438732a90aab880dde72d22151105b46d9908 (patch)
tree4d03aed6d51916539762772bcfdf5b43406b409c
parenta728386bd5875414c9d97d9456ce57d5aa599be4 (diff)
Fix test for updated test data
Replace another constant with a computed value, so we can accommodate new test data without spuriously failing.
-rw-r--r--spec/models/xapian_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/xapian_spec.rb b/spec/models/xapian_spec.rb
index af4089d75..195b39eee 100644
--- a/spec/models/xapian_spec.rb
+++ b/spec/models/xapian_spec.rb
@@ -96,7 +96,7 @@ describe PublicBody, " when indexing requests by body they are to" do
xapian_object = InfoRequest.full_search([InfoRequestEvent], "requested_from:tgq", 'created_at', true, nil, 100, 1)
xapian_object.results.size.should == 0
xapian_object = InfoRequest.full_search([InfoRequestEvent], "requested_from:gq", 'created_at', true, nil, 100, 1)
- xapian_object.results.size.should == 4
+ xapian_object.results.size.should == PublicBody.find_by_url_name("gq").info_requests.map(&:info_request_events).flatten.size
models_found_after = xapian_object.results.map { |x| x[:model] }
models_found_before.should == models_found_after