diff --git a/core/modules/comment/src/Tests/Views/CommentLinkApproveTest.php b/core/modules/comment/src/Tests/Views/CommentLinkApproveTest.php
new file mode 100644
index 0000000..341851c
--- /dev/null
+++ b/core/modules/comment/src/Tests/Views/CommentLinkApproveTest.php
@@ -0,0 +1,154 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\comment\Tests\Views\CommentLinkApproveTest.
+ */
+
+namespace Drupal\comment\Tests\Views;
+
+use Drupal\comment\Entity\Comment;
+use Drupal\Core\Url;
+use Drupal\user\Entity\Role;
+use Drupal\user\Entity\User;
+use Drupal\views\Entity\View;
+use Drupal\views\Tests\ViewKernelTestBase;
+use Drupal\views\Views;
+
+/**
+ * Tests the core Drupal\comment\Plugin\views\field\LinkApprove handler.
+ *
+ * @group comment
+ */
+class CommentLinkApproveTest extends ViewKernelTestBase {
+
+  /**
+   * Admin user.
+   *
+   * @var \Drupal\user\UserInterface
+   */
+  protected $adminUser;
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['user', 'comment', 'entity_test'];
+
+  /**
+   * Views used by this test.
+   *
+   * @var array
+   */
+  public static $testViews = array('comment_test_view');
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp($import_test_views = TRUE) {
+    parent::setUp($import_test_views);
+
+    $this->installEntitySchema('user');
+    $this->installEntitySchema('comment');
+    // Create the anonymous role.
+    $this->installConfig(['user']);
+
+    // Create an anonymous user.
+    $storage = \Drupal::entityManager()->getStorage('user');
+    // Insert a row for the anonymous user.
+    $storage
+      ->create(array(
+        'uid' => 0,
+        'name' => '',
+        'status' => 0,
+      ))
+      ->save();
+
+    $admin_role = Role::create([
+      'id' => 'admin',
+      'permissions' => ['administer comments', 'access user profiles'],
+    ]);
+    $admin_role->save();
+
+    $this->adminUser = User::create([
+      'name' => $this->randomMachineName(),
+      'roles' => [$admin_role->id()],
+    ]);
+    $this->adminUser->save();
+
+    // Create some comments.
+    $comment_anonymous = Comment::create([
+      'subject' => 'Anonymous comment title',
+      'uid' => 0,
+      'name' => 'barry',
+      'mail' => 'test@example.com',
+      'homepage' => 'https://example.com',
+      'entity_type' => 'entity_test',
+      'comment_type' => 'entity_test',
+      'status' => 0,
+    ]);
+    $comment_anonymous->save();
+
+    $comment = Comment::create([
+      'subject' => 'My comment title',
+      'uid' => $this->adminUser->id(),
+      'name' => $this->adminUser->label(),
+      'entity_type' => 'entity_test',
+      'comment_type' => 'entity_test',
+      'status' => 1,
+    ]);
+    $comment->save();
+  }
+
+  /**
+   * Test the comment approve link.
+   */
+  public function testLinkApprove() {
+
+    $view_id = $this->randomMachineName();
+    $view = View::create([
+      'id' => $view_id,
+      'base_table' => 'comment_field_data',
+      'display' => [
+        'default' => [
+          'display_plugin' => 'default',
+          'id' => 'default',
+          'display_options' => [
+            'fields' => [
+              'subject' => [
+                'table' => 'comment_field_data',
+                'field' => 'subject',
+                'id' => 'subject',
+                'plugin_id' => 'field',
+                'type' => 'string',
+              ],
+              'approve_comment' => [
+                'table' => 'comment',
+                'field' => 'approve_comment',
+                'id' => 'approve_comment',
+                'plugin_id' => 'comment_link_approve',
+              ],
+
+            ],
+          ],
+        ],
+      ],
+    ]);
+    $view->save();
+
+    /* @var \Drupal\Core\Session\AccountSwitcherInterface $account_switcher */
+    $account_switcher = \Drupal::service('account_switcher');
+
+    $account_switcher->switchTo($this->adminUser);
+    $executable = Views::getView($view_id);
+    $executable->preview();
+
+    $approve_comment = $executable->style_plugin->getField(0, 'approve_comment');
+    $options = ['query' => ['destination' => '/']];
+    $url = Url::fromRoute('comment.approve', ['comment' => 1], $options);
+    $this->assertEqual(\Drupal::l('Approve', $url), (string) $approve_comment, 'Found a comment approve link for an unapproved comment.');
+
+    $approve_comment = $executable->style_plugin->getField(1, 'approve_comment');
+    $this->assertFalse((string) $approve_comment, "Didn't find a comment approve link for an already approved comment.");
+  }
+
+}
