diff options
author | kennyj <kennyj@gmail.com> | 2012-04-14 00:33:25 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-04-14 00:33:25 +0900 |
commit | f49d76662ed130ca41806bb3d91666423a411074 (patch) | |
tree | fa6cf0710484da31fe134aa66e5d402b229f41fb /activerecord/test | |
parent | 1480dfa3ba1f30691841e3d94d78b6e8905849a9 (diff) | |
download | rails-f49d76662ed130ca41806bb3d91666423a411074.tar.gz rails-f49d76662ed130ca41806bb3d91666423a411074.tar.bz2 rails-f49d76662ed130ca41806bb3d91666423a411074.zip |
Fix wrong return value from reset_sequence_name method.
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 5fb49d540f..ef22936e18 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1503,7 +1503,11 @@ class BasicsTest < ActiveRecord::TestCase after_seq = Joke.sequence_name assert_not_equal before_columns, after_columns - assert_not_equal before_seq, after_seq unless before_seq.blank? && after_seq.blank? + unless before_seq.nil? && after_seq.nil? + assert_not_equal before_seq, after_seq + assert_equal "cold_jokes_id_seq", before_seq + assert_equal "funny_jokes_id_seq", after_seq + end end def test_dont_clear_sequence_name_when_setting_explicitly @@ -1514,7 +1518,7 @@ class BasicsTest < ActiveRecord::TestCase Joke.table_name = "funny_jokes" after_seq = Joke.sequence_name - assert_equal before_seq, after_seq unless before_seq.blank? && after_seq.blank? + assert_equal before_seq, after_seq unless before_seq.nil? && after_seq.nil? end def test_dont_clear_inheritnce_column_when_setting_explicitly |