diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-13 17:14:57 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-01-13 17:14:57 -0800 |
commit | 9b84dd4b28df6c3d8eacd93d1262f897d429eb78 (patch) | |
tree | f47682210784b6dc8b13485d621ad8971788cbb5 | |
parent | 2d35e58a05c5917a275ac164135a686b40ac544f (diff) | |
parent | 01434a5ee651972e3ec13cd5a55e32409b17a9e1 (diff) | |
download | rails-9b84dd4b28df6c3d8eacd93d1262f897d429eb78.tar.gz rails-9b84dd4b28df6c3d8eacd93d1262f897d429eb78.tar.bz2 rails-9b84dd4b28df6c3d8eacd93d1262f897d429eb78.zip |
Merge pull request #8917 from adomokos/adding_more_tests_to_activemodel_model
Adding tests for ActiveModel::Model
-rw-r--r-- | activemodel/test/cases/model_test.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/test/cases/model_test.rb b/activemodel/test/cases/model_test.rb index d93fd96b88..588d8e661e 100644 --- a/activemodel/test/cases/model_test.rb +++ b/activemodel/test/cases/model_test.rb @@ -20,7 +20,13 @@ class ModelTest < ActiveModel::TestCase def test_initialize_with_nil_or_empty_hash_params_does_not_explode assert_nothing_raised do BasicModel.new() + BasicModel.new nil BasicModel.new({}) end end + + def test_persisted_is_always_false + object = BasicModel.new(:attr => "value") + assert object.persisted? == false + end end |