diff --git a/core/modules/node/src/Tests/NodeCreationTest.php b/core/modules/node/src/Tests/NodeCreationTest.php
index a305ca54393dd4c9d51e18b31705e200d207d632..86453b63cf83cb47095c2cd96ad012048786b9ee 100644
--- a/core/modules/node/src/Tests/NodeCreationTest.php
+++ b/core/modules/node/src/Tests/NodeCreationTest.php
@@ -158,4 +158,27 @@ public function testAuthorAutocomplete() {
     $this->assertEqual(count($result), 1, 'Ensure that the user does have access to the autocompletion');
   }
 
+  /**
+   * Check node/add when no node types exist.
+   */
+  function testNodeAddWithoutContentTypes () {
+    $this->drupalGet('node/add');
+    $this->assertResponse(200);
+    $this->assertNoLinkByHref('/admin/structure/types/add');
+
+    // Test /node/add page without content types.
+    foreach (entity_load_multiple('node_type') as $entity ) {
+      $entity->delete();
+    }
+
+    $this->drupalGet('node/add');
+    $this->assertResponse(403);
+
+    $admin_content_types = $this->drupalCreateUser(array('administer content types'));
+    $this->drupalLogin($admin_content_types);
+
+    $this->drupalGet('node/add');
+
+    $this->assertLinkByHref('/admin/structure/types/add');
+  }
 }