From f16b0df76240bc0faccbb9fc3f51b5bbe8f14856 Mon Sep 17 00:00:00 2001
From: Oliver Davies <oliver@oliverdavies.uk>
Date: Mon, 23 Oct 2017 21:40:10 +0100
Subject: [PATCH] Add page test

This test will fail and return a 404 error code rather than
a 200 code as the page hasn't been built yet.
---
 tests/src/Functional/PageListTest.php | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/src/Functional/PageListTest.php b/tests/src/Functional/PageListTest.php
index 38155ed..9c1d9e6 100644
--- a/tests/src/Functional/PageListTest.php
+++ b/tests/src/Functional/PageListTest.php
@@ -11,4 +11,14 @@ class PageListTest extends BrowserTestBase {
    */
   protected static $modules = ['tdd_dublin'];
 
+  /**
+   * Test that the pages listing page exists and is accessible.
+   */
+  public function testListingPageExists() {
+    // Go to /pages and check that it is accessible by checking the status
+    // code.
+    $this->drupalGet('pages');
+    $this->assertSession()->statusCodeEquals(200);
+  }
+
 }