Commit | Line | Data |
6bc86362 |
1 | #!perl -T |
2 | use strict; |
3 | use warnings; |
4 | use lib 'lib'; |
5 | use Test::More tests => 5; |
6 | use lib 't/lib'; |
7 | use Test::WWW::Mechanize::Catalyst 'Catty'; |
8 | |
9 | my $root = "http://localhost"; |
10 | |
46377765 |
11 | my $m = Test::WWW::Mechanize::Catalyst->new; |
6bc86362 |
12 | $m->credentials( 'user', 'pass' ); |
13 | |
14 | $m->get_ok("$root/check_auth_basic/"); |
15 | is( $m->ct, "text/html" ); |
16 | is( $m->status, 200 ); |
17 | |
18 | $m->credentials( 'boofar', 'pass' ); |
19 | |
20 | $m->get("$root/check_auth_basic/"); |
21 | is( $m->ct, "text/html" ); |
22 | is( $m->status, 401 ); |
23 | |