[Catalyst-commits] r9790 - in 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 12:50:36 GMT 2009


Author: abraxxa
Date: 2009-04-22 13:50:35 +0100 (Wed, 22 Apr 2009)
New Revision: 9790

Modified:
   Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/Makefile.PL
   Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t/basic.t
Log:
added basic tests for NTLM
changed requirement from Authen::NTLM to Authen::NTLM::HTTP because of duplicate namespace usage


Modified: Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/Makefile.PL
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/Makefile.PL	2009-04-22 03:57:49 UTC (rev 9789)
+++ Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/Makefile.PL	2009-04-22 12:50:35 UTC (rev 9790)
@@ -15,7 +15,7 @@
 
 feature  'NTLM support',
     -default        => 0,
-    'Authen::NTLM'  => '0.31';
+    'Authen::NTLM::HTTP'  => '0.31';
 
 resources repository => 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Authentication-Credential-HTTP';
 

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 03:57:49 UTC (rev 9789)
+++ Catalyst-Authentication-Credential-HTTP/1.000/branches/ntlm_support/t/basic.t	2009-04-22 12:50:35 UTC (rev 9790)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use strict;
 use warnings;
-use Test::More tests => 35;
+use Test::More tests => 37;
 use Test::MockObject::Extends;
 use Test::MockObject;
 use Test::Exception;
@@ -176,4 +176,18 @@
         "WWW-Authenticate header set: digest domains set with use_uri_for");
     like( ($res_headers->header('WWW-Authenticate'))[1], qr/domain="uri_for:dom1 uri_for:dom2"/, 
         "WWW-Authenticate header set: basic domains set with use_uri_for");
-}
\ No newline at end of file
+}
+
+# Check ntlm header generation
+$req_headers->clear;
+$res_headers->clear;
+$c->clear;
+{
+    my $self = new_self( type => 'ntlm', password_type => 'self_check', ntlm_domain => 'FOO' );
+    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");
+}




More information about the Catalyst-commits mailing list