diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayAttachmentTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayAttachmentTest.php
new file mode 100644
index 0000000..2f4daee
--- /dev/null
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayAttachmentTest.php
@@ -0,0 +1,59 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\views\Tests\Plugin\DisplayAttachmentTest.
+ */
+
+namespace Drupal\views\Tests\Plugin;
+
+/**
+ * Tests the feed display plugin.
+ *
+ * @see Drupal\views\Plugin\views\display\Feed
+ */
+class DisplayAttachmentTest extends PluginTestBase {
+
+  /**
+   * Views used by this test.
+   *
+   * @var array
+   */
+  public static $testViews = array('test_display_attachment');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Display: Attachment plugin',
+      'description' => 'Tests the attachment display plugin.',
+      'group' => 'Views Plugins',
+    );
+  }
+
+  protected function setUp() {
+    parent::setUp();
+
+    $this->enableViewsTestModule();
+  }
+
+
+  /**
+   * Tests the attachment plugin.
+   */
+  public function testAttachment() {
+    // @todo Try to understand why the initial loading doesn't rebuild the menu
+    // cache.
+    state()->set('menu_rebuild_needed', TRUE);
+
+    $this->drupalGet('test-display-attachment');
+
+    $result = $this->xpath('//div[contains(@class, "view-content")]');
+    $this->assertEqual(count($result), 2, 'Both actual view and the attachment is rendered.');
+
+    $result = $this->xpath('//div[contains(@class, "attachment-after")]');
+    $this->assertEqual(count($result), 0, 'The attachment is not rendered after the actual view.');
+
+    $result = $this->xpath('//div[contains(@class, "attachment-before")]');
+    $this->assertEqual(count($result), 1, 'The attachment is rendered before the actual view.');
+  }
+
+}
diff --git a/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml b/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml
new file mode 100644
index 0000000..82a87fc
--- /dev/null
+++ b/core/modules/views/tests/views_test_config/test_views/views.view.test_display_attachment.yml
@@ -0,0 +1,67 @@
+api_version: '3.0'
+base_field: id
+base_table: views_test_data
+core: 8.x
+description: ''
+disabled: '0'
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: ''
+    display_options:
+      access:
+        type: perm
+      cache:
+        type: none
+      query:
+        type: views_query
+      exposed_form:
+        type: basic
+      pager:
+        type: full
+        options:
+          items_per_page: '10'
+      style:
+        type: default
+      row:
+        type: fields
+      fields:
+        name:
+          id: name
+          table: views_test_data
+          field: name
+          label: ''
+          alter:
+            alter_text: '0'
+            make_link: '0'
+            absolute: '0'
+            trim: '0'
+            word_boundary: '0'
+            ellipsis: '0'
+            strip_tags: '0'
+            html: '0'
+          hide_empty: '0'
+          empty_zero: '0'
+          link_to_node: '1'
+      title: test_display_attachment
+  page_1:
+    display_plugin: page
+    id: page_1
+    display_title: Page
+    position: '1'
+    display_options:
+      path: test-display-attachment
+  attachment_1:
+    display_plugin: attachment
+    id: attachment_1
+    display_title: Attachment
+    position: '2'
+    display_options:
+      displays:
+        page_1: page_1
+human_name: test_display_attachment
+module: views
+name: test_display_attachment
+tag: ''
