Permalink
Browse files

Merge pull request #8917 from adomokos/adding_more_tests_to_activemod…

…el_model

Adding tests for ActiveModel::Model
  • Loading branch information...
2 parents 2d35e58 + 01434a5 commit 9b84dd4b28df6c3d8eacd93d1262f897d429eb78 @rafaelfranca rafaelfranca committed Jan 14, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 activemodel/test/cases/model_test.rb
@@ -20,7 +20,13 @@ def test_initialize_with_params
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

0 comments on commit 9b84dd4

Please sign in to comment.