aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/public_body_controller_spec.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-04-07 12:58:54 +0100
committerLouise Crow <louise.crow@gmail.com>2015-04-07 12:58:54 +0100
commit06e13489e2afa36f2070f61fd68abb357c1d18b7 (patch)
tree454b66a828144f616e3675f553c7a0f396b8697e /spec/controllers/public_body_controller_spec.rb
parentd2fd05bb203466187ec87479f78792f3e047ff45 (diff)
parentcd0823a4bae3e98301e2eeea50c6d0f5c9c8e83d (diff)
Merge branch 'master' into rails-3-develop
Diffstat (limited to 'spec/controllers/public_body_controller_spec.rb')
-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