aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenare Degan <henare.degan@gmail.com>2013-02-04 15:05:31 +1100
committerHenare Degan <henare.degan@gmail.com>2013-02-07 07:46:45 +1100
commitbfeadd9e2273ed8c09f841e1345fb826182d93a6 (patch)
treeca393878b02efb7ee3073948e88a47886e6825b4
parent8ef10e453fb0c87c3c58ce6eefdd54c1928a6590 (diff)
Add a test that exposes a problem we have with renaming attributes
-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 0b1bfccd7..bc693b4da 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