diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 17:51:21 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-28 17:51:21 +0000 |
commit | 16f6bd4070d57fc1eacb1a531385af205233a573 (patch) | |
tree | ea3781be6bcaa09ab34ba442e34f741b09ac34b4 /activerecord/test | |
parent | e720ba0b5f40ca1714a9c59b74da8ab0a0d3e00e (diff) | |
download | rails-16f6bd4070d57fc1eacb1a531385af205233a573.tar.gz rails-16f6bd4070d57fc1eacb1a531385af205233a573.tar.bz2 rails-16f6bd4070d57fc1eacb1a531385af205233a573.zip |
SQLServer: don't choke on strings containing 'null'. Closes #7083.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-x | activerecord/test/base_test.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb index 8892dcbdc8..f2991bc721 100755 --- a/activerecord/test/base_test.rb +++ b/activerecord/test/base_test.rb @@ -164,8 +164,16 @@ class BasicsTest < Test::Unit::TestCase topic.reload assert_equal("null", topic.title) assert_equal("null", topic.author_name) - end - + end + + def test_save_nil_string_attributes + topic = Topic.find(1) + topic.title = nil + topic.save! + topic.reload + assert_nil topic.title + end + def test_hashes_not_mangled new_topic = { :title => "New Topic" } new_topic_values = { :title => "AnotherTopic" } |