Commit 0998e9dead9e7c5e695003abe3a9ffe677c335a3

Authored by AntonioTerceiro
1 parent 8d3d9809

ActionItem237: ArticleCategorization cannot be saved, because it does not have an id


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1637 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
test/unit/article_categorization_test.rb
@@ -9,12 +9,12 @@ class ArticleCategorizationTest < Test::Unit::TestCase @@ -9,12 +9,12 @@ class ArticleCategorizationTest < Test::Unit::TestCase
9 should 'belong to article' do 9 should 'belong to article' do
10 p = create_user('testuser').person 10 p = create_user('testuser').person
11 article = p.articles.build(:name => 'test article'); article.save! 11 article = p.articles.build(:name => 'test article'); article.save!
12 - assert_equal article, ArticleCategorization.create!(:article => article).article 12 + assert_equal article, ArticleCategorization.new(:article => article).article
13 end 13 end
14 14
15 should 'belong to category' do 15 should 'belong to category' do
16 category = Category.create!(:name => 'one category', :environment => Environment.default) 16 category = Category.create!(:name => 'one category', :environment => Environment.default)
17 - assert_equal category, ArticleCategorization.create!(:category => category).category 17 + assert_equal category, ArticleCategorization.new(:category => category).category
18 end 18 end
19 19
20 end 20 end