[Catalyst-commits] r9791 - Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t

abraxxa at dev.catalyst.perl.org abraxxa at dev.catalyst.perl.org
Wed Apr 22 13:13:59 GMT 2009


Author: abraxxa
Date: 2009-04-22 14:13:58 +0100 (Wed, 22 Apr 2009)
New Revision: 9791

Modified:
   Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t/basic.t
Log:
added another NTLM test which checks for failure if ntlm_domain isn't configured


Modified: Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t/basic.t
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t/basic.t	2009-04-22 12:50:35 UTC (rev 9790)
+++ Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t/basic.t	2009-04-22 13:13:58 UTC (rev 9791)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use strict;
 use warnings;
-use Test::More tests => 37;
+use Test::More tests => 38;
 use Test::MockObject::Extends;
 use Test::MockObject;
 use Test::Exception;
@@ -187,7 +187,17 @@
     throws_ok {
         $self->authenticate( $c, $realm );
     } qr/^ $Catalyst::DETACH $/x, "detached";
-    use Data::Dump qw/dump/;
     like( ($res_headers->header('WWW-Authenticate'))[0], qr/NTLM/, 
         "WWW-Authenticate header set: NTLM");
 }
+
+# Check ntlm auth failure without ntlm_domain
+$req_headers->clear;
+$res_headers->clear;
+$c->clear;
+{
+    my $self = new_self( type => 'ntlm', password_type => 'self_check' );
+    throws_ok {
+        $self->authenticate( $c, $realm );
+    } qr/^ntlm_domain needs to be set in your credential configuration or passed to your authenticate\/authenticate_ntlm call for NTLM to work!/, "fails without ntlm_domain";
+}




More information about the Catalyst-commits mailing list