aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2015-05-22 18:25:45 +0200
committerHenare Degan <henare.degan@gmail.com>2015-05-22 18:25:45 +0200
commit39d91dcd47338fb784f2863ca70ab5d33d5ff789 (patch)
treee96ac7cd91829170c391d2968ca381c086f4bcba /spec
parent28c807f84a39e58c0dd74e9db7808b5a9d70e796 (diff)
Only include visible requests in count on body page
Fixes #286
Diffstat (limited to 'spec')
-rw-r--r--spec/views/public_body/show.html.erb_spec.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/views/public_body/show.html.erb_spec.rb b/spec/views/public_body/show.html.erb_spec.rb
index adf78d307..a4edcfc22 100644
--- a/spec/views/public_body/show.html.erb_spec.rb
+++ b/spec/views/public_body/show.html.erb_spec.rb
@@ -30,6 +30,7 @@ describe "public_body/show" do
assign(:xapian_requests, @xap)
assign(:page, 1)
assign(:per_page, 10)
+ assign(:number_of_visible_requests, 4)
end
it "should be successful" do
@@ -48,7 +49,7 @@ describe "public_body/show" do
end
it "should cope with no results" do
- @pb.stub!(:info_requests).and_return([])
+ assign(:number_of_visible_requests, 0)
render
response.should have_selector('p', :content => "Nobody has made any Freedom of Information requests")
end