Add a "negative" test to confirm that test02 does not have an admin create link
Kennedy Clark [Sun, 15 Nov 2009 13:53:16 +0000 (13:53 +0000)]
lib/Catalyst/Manual/Tutorial/08_Testing.pod

index 95bb753..a3889b4 100644 (file)
@@ -271,7 +271,9 @@ editor and enter the following:
     $_->content_contains("/logout\">User Logout</a>",
         "Both users should have a 'User Logout'") for $ua1, $ua2;
     $ua1->content_contains("/books/form_create\">Admin Create</a>",
-        "Only 'test01' should have a create link");
+        "'test01' should have a create link");
+    $ua2->content_lacks("/books/form_create\">Admin Create</a>",
+        "'test02' should NOT have a create link");
     
     $ua1->get_ok("http://localhost/books/list", "View book list as 'test01'");