aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-01-23 14:41:28 +0000
committerGareth Rees <gareth@mysociety.org>2015-02-20 11:59:04 +0000
commit83033a21d0087088beb849c6e6b224eb1a550e1e (patch)
tree00df2d995cf2fa5902afd28eadc711163738b4d2
parente086e72f283ba485952daca0b12033188e4a93f9 (diff)
Use correct method name in error.
-rw-r--r--app/models/public_body.rb2
-rw-r--r--spec/models/public_body_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index c2078d02d..36d66b665 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -258,7 +258,7 @@ class PublicBody < ActiveRecord::Base
elsif !has_request_email?
return 'bad_contact'
else
- raise "requestable_failure_reason called with type that has no reason"
+ raise "not_requestable_reason called with type that has no reason"
end
end
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb
index 91340a12c..b304050dc 100644
--- a/spec/models/public_body_spec.rb
+++ b/spec/models/public_body_spec.rb
@@ -1054,7 +1054,7 @@ describe PublicBody do
end
it 'should raise an error if the body is not defunct, FOI applies and has an email address' do
- expected_error = "requestable_failure_reason called with type that has no reason"
+ expected_error = "not_requestable_reason called with type that has no reason"
lambda{ @body.not_requestable_reason }.should raise_error(expected_error)
end