diff options
Diffstat (limited to 'spec/models/public_body_spec.rb')
-rw-r--r-- | spec/models/public_body_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/models/public_body_spec.rb b/spec/models/public_body_spec.rb index 0b1bfccd7..34a91a2c9 100644 --- a/spec/models/public_body_spec.rb +++ b/spec/models/public_body_spec.rb @@ -169,6 +169,14 @@ describe PublicBody, " when saving" do @public_body.save! @public_body.first_letter.should == 'T' end + + it "should save the name when renaming an existing public body" do + public_body = public_bodies(:geraldine_public_body) + public_body.name = "Mark's Public Body" + public_body.save! + + public_body.name.should == "Mark's Public Body" + end end describe PublicBody, "when searching" do @@ -456,7 +464,7 @@ 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", "").twice.and_return("catch_all_test_email@foo.com") + AlaveteliConfiguration.should_receive(:override_all_public_body_request_emails).twice.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 |