diff options
author | tony <tony> | 2009-03-22 10:27:03 +0000 |
---|---|---|
committer | tony <tony> | 2009-03-22 10:27:03 +0000 |
commit | 1d1e751a4c12990f17085400b51908e7a6d87b5c (patch) | |
tree | 48c8b11cadb8936afcd401c72dad5cf6b493e09c /spec/models | |
parent | daea88979fea5a1c72d0af5f9cc411efbfc044fd (diff) |
Add 'xapian_requests' methods to PublicBody
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/public_body_spec.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index bcce59471..38f27cc47 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -50,7 +50,7 @@ describe PublicBody, "when searching" do end describe PublicBody, " when indexing with Xapian" do - fixtures :public_bodies + fixtures :public_bodies, :info_request_events, :info_requests before(:all) do rebuild_xapian_index @@ -68,7 +68,12 @@ describe PublicBody, " when indexing with Xapian" do xapian_object.results[0][:model].should == public_bodies(:humpadink_public_body) end -end - + it "should find requests made to it" do + @body = public_bodies(:humpadink_public_body) + xapian_requests = @body.xapian_requests + xapian_object.results.size.should == 2 + xapian_object.results[0][:model].should == public_bodies(:humpadink_public_body) + end +end |