Skip to content

Commit

Permalink
added additional update_attributes test
Browse files Browse the repository at this point in the history
  • Loading branch information
joshmh committed Feb 13, 2009
1 parent 7f234c6 commit 4fff48a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/active_record/versioning_test.rb
Expand Up @@ -481,4 +481,12 @@ def setup
section.revert_to 1
assert section.update_attributes( {} )
end

test 'update_attributes failure' do
section = Section.create :content => 'foo'
assert !section.update_attributes( { :content => '' } )
assert_nil section.reload.attributes['content']
assert_equal 'foo', section.content
end

end

0 comments on commit 4fff48a

Please sign in to comment.