Commit 23636102d4c738aeee56302b7bdfa9f8713842ae

Authored by Joenio Costa
1 parent 5065dff0

fixing mass-assignment error in units tests

(ActionItem3124)
Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
test/unit/article_test.rb
... ... @@ -1842,7 +1842,9 @@ class ArticleTest < ActiveSupport::TestCase
1842 1842 end
1843 1843  
1844 1844 should 'not create version when receive a comment' do
1845   - a = Article.create!(:name => 'my article', :body => 'my text', :profile_id => profile.id)
  1845 + a = Article.new(:name => 'my article', :body => 'my text')
  1846 + a.profile = profile
  1847 + a.save!
1846 1848 Comment.create!(:title => 'test', :body => 'asdsad', :author => profile, :source => a)
1847 1849 assert_equal 1, a.versions.count
1848 1850 end
... ...