X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F08_Testing.pod;h=a3889b40d7ac312d7607a3748a724b2bfe26e74f;hb=1dc333c7b1dbb2334c1a263f5c19e6191f5562a8;hp=c8671c0b4e958c198d025bc5366e9239dd82fd25;hpb=3ab6187c1a123983b6ae29e57f543328ce15755c;p=catagits%2FCatalyst-Manual.git diff --git a/lib/Catalyst/Manual/Tutorial/08_Testing.pod b/lib/Catalyst/Manual/Tutorial/08_Testing.pod index c8671c0..a3889b4 100644 --- a/lib/Catalyst/Manual/Tutorial/08_Testing.pod +++ b/lib/Catalyst/Manual/Tutorial/08_Testing.pod @@ -237,7 +237,12 @@ editor and enter the following: # Log in as each user # Specify username and password on the URL $ua1->get_ok("http://localhost/login?username=test01&password=mypass", "Login 'test01'"); - $ua1->get_ok("http://localhost/login?username=test02&password=mypass", "Login 'test02'"); + # Could make user2 like user1 above, but use the form to show another way + $ua2->submit_form( + fields => { + username => 'test02', + password => 'mypass', + }); # Go back to the login page and it should show that we are already logged in $_->get_ok("http://localhost/login", "Return to '/login'") for $ua1, $ua2; @@ -265,8 +270,10 @@ editor and enter the following: # Make sure the appropriate logout buttons are displayed $_->content_contains("/logout\">User Logout", "Both users should have a 'User Logout'") for $ua1, $ua2; - $ua1->content_contains("/books/form_create\">Create", - "Only 'test01' should have a create link"); + $ua1->content_contains("/books/form_create\">Admin Create", + "'test01' should have a create link"); + $ua2->content_lacks("/books/form_create\">Admin Create", + "'test02' should NOT have a create link"); $ua1->get_ok("http://localhost/books/list", "View book list as 'test01'"); @@ -399,7 +406,7 @@ Kennedy Clark, C Please report any errors, issues or suggestions to the author. The most recent version of the Catalyst Tutorial can be found at -L. +L. Copyright 2006-2008, Kennedy Clark, under Creative Commons License (L).