From a614778382c6577f09dd3f549144771bac185aaa Mon Sep 17 00:00:00 2001 From: Rodrigo Souto Date: Fri, 28 Dec 2012 20:13:02 +0000 Subject: [PATCH] Testing article approval with an article that has a nil author --- test/unit/approve_article_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/test/unit/approve_article_test.rb b/test/unit/approve_article_test.rb index 1f71acc..507176a 100644 --- a/test/unit/approve_article_test.rb +++ b/test/unit/approve_article_test.rb @@ -414,4 +414,12 @@ class ApproveArticleTest < ActiveSupport::TestCase assert_match /My Article/, task.task_cancelled_message end + should 'not save 4 on the new article\'s last_changed_by_ud after approval if author is nil' do + article = fast_create(Article) + task = ApproveArticle.create!(:article => article, :target => community, :requestor => profile) + task.finish + new_article = Article.last + assert_nil new_article.last_changed_by_id + end + end -- libgit2 0.21.2