Doc patch. kd++
[catagits/Test-WWW-Mechanize-Catalyst.git] / lib / Test / WWW / Mechanize / Catalyst.pm
index 866a09f..ccc6890 100644 (file)
@@ -142,8 +142,6 @@ sub _do_catalyst_request {
     return Catalyst::Test::remote_request($request)
       if $ENV{CATALYST_SERVER};
 
-
-
     # If there's no Host header, set one.
     unless ($request->header('Host')) {
       my $host = $self->has_host
@@ -452,6 +450,21 @@ Returns true value if the specified link was found and followed
 successfully.  The HTTP::Response object returned by follow_link()
 is not available.
 
+=head1 CAVEATS
+
+=head2 External Redirects and allow_external
+
+If you use non-fully qualified urls in your test scripts (i.e. anything without
+a host, such as C<< ->get_ok( "/foo") >> ) and your app redirects to an
+external URL, expect to be bitten once you come back to your application's urls
+(it will try to request them on the remote server.) This is due to a limitation
+in WWW::Mechanize.
+
+One workaround for this is that if you are expecting to redirect to an external
+site, clone the TWMC obeject and use the cloned object for the external
+redirect.
+
+
 =head1 SEE ALSO
 
 Related modules which may be of interest: L<Catalyst>,