aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/public_body_controller_spec.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/public_body_controller_spec.rb b/spec/controllers/public_body_controller_spec.rb
index 130631ef6..ff0a70a6f 100644
--- a/spec/controllers/public_body_controller_spec.rb
+++ b/spec/controllers/public_body_controller_spec.rb
@@ -82,6 +82,13 @@ describe PublicBodyController, "when showing a body" do
expect(flash[:search_params]).to eq(search_params)
end
+
+ it 'should not show high page offsets as these are extremely slow to generate' do
+ lambda {
+ get :show, { :url_name => 'dfh', :view => 'all', :page => 25 }
+ }.should raise_error(ActiveRecord::RecordNotFound)
+ end
+
end
describe PublicBodyController, "when listing bodies" do