Permalink
Browse files

test updates and creates

  • Loading branch information...
1 parent a8a1c18 commit dc1dc4ba7c02bc669c828b81c77b8b0bd758463f Bryce Kerley committed Jul 15, 2008
Showing with 11 additions and 0 deletions.
  1. +11 −0 test/unit/hat_test.rb
View
@@ -11,6 +11,17 @@ def test_what_goes_in_comes_back_out
assert_equal description, h.description
end
+ def test_updates
+ h = Hat.create(:name=>'baseball hat', :description=>'dunno')
+ description = <<EOF
+<span style="color: #800">TEAM LOGO</span>
+EOF
+ h.description = description
+ assert_equal description, h.description
+ h.save
+ assert_equal description, h.description
+ end
+
def test_actually_serializing
description = {:hat=>'awesome'}
h = Hat.create(:name=>'awesome hat', :description=>description)

0 comments on commit dc1dc4b

Please sign in to comment.