Commit a614778382c6577f09dd3f549144771bac185aaa
1 parent
622e2512
Exists in
master
and in
23 other branches
Testing article approval with an article that has a nil author
Showing
1 changed file
with
8 additions
and
0 deletions
Show diff stats
test/unit/approve_article_test.rb
| @@ -414,4 +414,12 @@ class ApproveArticleTest < ActiveSupport::TestCase | @@ -414,4 +414,12 @@ class ApproveArticleTest < ActiveSupport::TestCase | ||
| 414 | assert_match /My Article/, task.task_cancelled_message | 414 | assert_match /My Article/, task.task_cancelled_message |
| 415 | end | 415 | end |
| 416 | 416 | ||
| 417 | + should 'not save 4 on the new article\'s last_changed_by_ud after approval if author is nil' do | ||
| 418 | + article = fast_create(Article) | ||
| 419 | + task = ApproveArticle.create!(:article => article, :target => community, :requestor => profile) | ||
| 420 | + task.finish | ||
| 421 | + new_article = Article.last | ||
| 422 | + assert_nil new_article.last_changed_by_id | ||
| 423 | + end | ||
| 424 | + | ||
| 417 | end | 425 | end |