diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
index 8f802c1..6ee843f 100644
--- a/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
+++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentActionsTest.php
@@ -24,7 +24,8 @@ class CommentActionsTest extends CommentTestBase {
    */
   function testCommentPublishUnpublishActions() {
     $this->drupalLogin($this->web_user);
-    $comment_text = $this->randomName();
+    $keyword = 'keyword';
+    $comment_text = $keyword . ' ' . $this->randomName();
     $subject = $this->randomName();
     $comment = $this->postComment($this->node, $comment_text, $subject);
     $comment = comment_load($comment->id);
@@ -51,6 +52,13 @@ class CommentActionsTest extends CommentTestBase {
     $this->assertEqual(comment_load($comment->cid)->status, COMMENT_PUBLISHED, t('Comment was published'));
     $this->assertWatchdogMessage('Published comment %subject.', array('%subject' => $subject), t('Found watchdog message'));
     $this->clearWatchdog();
+    
+    // Unpublish a comment by keyword (direct form: modify the comment in the database).
+    $context = array('keywords' => array($keyword));
+    comment_unpublish_by_keyword_action($comment, $context);
+    $this->assertEqual($comment->status, COMMENT_NOT_PUBLISHED, t('Comment was unpublished'));
+    $this->assertWatchdogMessage('Unpublished comment %subject.', array('%subject' => $subject), t('Found watchdog message'));
+    $this->clearWatchdog();
   }
 
   /**
