From 23636102d4c738aeee56302b7bdfa9f8713842ae Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Tue, 17 Jun 2014 00:09:15 -0300 Subject: [PATCH] fixing mass-assignment error in units tests --- test/unit/article_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/unit/article_test.rb b/test/unit/article_test.rb index 54911a3..655b472 100644 --- a/test/unit/article_test.rb +++ b/test/unit/article_test.rb @@ -1842,7 +1842,9 @@ class ArticleTest < ActiveSupport::TestCase end should 'not create version when receive a comment' do - a = Article.create!(:name => 'my article', :body => 'my text', :profile_id => profile.id) + a = Article.new(:name => 'my article', :body => 'my text') + a.profile = profile + a.save! Comment.create!(:title => 'test', :body => 'asdsad', :author => profile, :source => a) assert_equal 1, a.versions.count end -- libgit2 0.21.2