diff --git a/modules/node/node.test b/modules/node/node.test
index 0777e11..b03cc88 100644
--- a/modules/node/node.test
+++ b/modules/node/node.test
@@ -618,6 +618,32 @@ class NodeCreationTestCase extends DrupalWebTestCase {
     // Check that the user was redirected to the home page.
     $this->assertText(t('Welcome to Drupal'), t('The user is redirected to the home page.'));
   }
+
+  /**
+   * 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(node_type_get_types() as $node_type) {
+      node_type_delete($node_type->type);
+    }
+    node_types_rebuild();
+    menu_rebuild();
+
+    $this->drupalGet('node/add');
+    $this->assertResponse(403);
+
+    // A content type admin should see the "Add content type" link.
+    $admin_content_type = $this->drupalCreateUser(array('administer content types'));
+    $this->drupalLogin($admin_content_type);
+
+    $this->drupalGet('node/add');
+    $this->assertLinkByHref('/admin/structure/types/add');
+  }
 }
 
 /**
