diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 07:15:28 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-03-07 07:15:28 +0000 |
commit | 8b762fce57fa55a38bf2b146766298c4fb0d2377 (patch) | |
tree | e5fa96cb2fca20f2dee5a5bb100a462126c6924d /modules/comment/comment.test | |
parent | 11ae79673ac66df672124a215e0fe70d2251a31d (diff) | |
download | brdo-8b762fce57fa55a38bf2b146766298c4fb0d2377.tar.gz brdo-8b762fce57fa55a38bf2b146766298c4fb0d2377.tar.bz2 |
#699596 by mr.baileys and catch: Fixed (Un)publishing several comments doesn't work.
Diffstat (limited to 'modules/comment/comment.test')
-rw-r--r-- | modules/comment/comment.test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/modules/comment/comment.test b/modules/comment/comment.test index 4f27a460a..5fc78cbe1 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -895,6 +895,33 @@ class CommentApprovalTest extends CommentHelperCase { $this->drupalGet('node/' . $this->node->nid); $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.')); + + // Post 2 anonymous comments without contact info. + $comments[] = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE); + $comments[] = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE); + + // Publish multiple comments in one operation. + $this->drupalLogin($this->admin_user); + $this->drupalGet('admin/content/comment/approval'); + $this->assertText(t('Unapproved comments (@count)', array('@count' => 2)), t('Two unapproved comments waiting for approval.')); + $edit = array( + "comments[{$comments[0]->id}]" => 1, + "comments[{$comments[1]->id}]" => 1, + ); + $this->drupalPost(NULL, $edit, t('Update')); + $this->assertText(t('Unapproved comments (@count)', array('@count' => 0)), t('All comments were approved.')); + + // Delete multiple comments in one operation. + $edit = array( + 'operation' => 'delete', + "comments[{$comments[0]->id}]" => 1, + "comments[{$comments[1]->id}]" => 1, + "comments[{$anonymous_comment4->id}]" => 1, + ); + $this->drupalPost(NULL, $edit, t('Update')); + $this->assertText(t('Are you sure you want to delete these comments and all their children?'), t('Confirmation required.')); + $this->drupalPost(NULL, $edit, t('Delete comments')); + $this->assertText(t('No comments available.'), t('All comments were deleted.')); } /** |