aboutsummaryrefslogtreecommitdiffstats
path: root/spec/models
diff options
context:
space:
mode:
authorMatthew Landauer <matthew@openaustralia.org>2012-09-27 15:14:39 +1000
committerMatthew Landauer <matthew@openaustralia.org>2012-09-27 15:44:10 +1000
commit49fb299dde57e7db981ef31a7da12c6fd4761b01 (patch)
treecc55e96ab5ca6508b71063105242e1643adaac0b /spec/models
parent8a7d5b4045e289cc1a316202a2373b3b44f8ff06 (diff)
Add option to override all public body request emails
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/public_body_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb
index 011824190..ea78e5ec5 100644
--- a/spec/models/public_body_spec.rb
+++ b/spec/models/public_body_spec.rb
@@ -453,3 +453,11 @@ describe PublicBody do
end
end
+
+describe PublicBody, " when override all public body request emails set" do
+ it "should return the overridden request email" do
+ MySociety::Config.should_receive(:get).with("OVERRIDE_ALL_PUBLIC_BODY_REQUEST_EMAILS", "").and_return("catch_all_test_email@foo.com")
+ @geraldine = public_bodies(:geraldine_public_body)
+ @geraldine.request_email.should == "catch_all_test_email@foo.com"
+ end
+end