1 |
dpavlin |
103 |
#!/usr/bin/perl |
2 |
|
|
use strict; |
3 |
|
|
use warnings; |
4 |
|
|
|
5 |
dpavlin |
121 |
use Test::More tests => 10; |
6 |
dpavlin |
103 |
use lib 'lib'; |
7 |
|
|
|
8 |
|
|
BEGIN { |
9 |
|
|
use_ok('Frey::Test'); |
10 |
|
|
} |
11 |
|
|
|
12 |
|
|
eval "use Test::WWW::Mechanize"; |
13 |
|
|
if($@) { |
14 |
|
|
plan skip_all => 'Test::WWW::Mechanize not installed'; |
15 |
|
|
exit; |
16 |
|
|
} |
17 |
|
|
|
18 |
|
|
ok( my $kid_out = Frey::Test->start_server, 'start_server' ); |
19 |
|
|
ok( my $server = Frey::Test->get_server( $kid_out ), 'get_server' ); |
20 |
|
|
|
21 |
|
|
my $mech = Test::WWW::Mechanize->new; |
22 |
|
|
$mech->get_ok( $server ); |
23 |
|
|
|
24 |
|
|
$mech->content_contains("Frey"); |
25 |
|
|
|
26 |
dpavlin |
106 |
$mech->get_ok( '/ob/Strix::User' ); |
27 |
|
|
$mech->content_contains("Email"); |
28 |
|
|
|
29 |
dpavlin |
121 |
$mech->get_ok( '/~/Frey::Introspect' ); |
30 |
|
|
$mech->content_contains("introspect.css"); |
31 |
|
|
|
32 |
|
|
#diag $mech->content; |
33 |
|
|
|
34 |
dpavlin |
106 |
#$mech->field( email => 'test@example.com' ); # FIXME we mungle field names |
35 |
dpavlin |
103 |
#$mech->submit; |
36 |
|
|
|
37 |
dpavlin |
106 |
#$mech->content_contains('test@example.com'); |
38 |
|
|
|
39 |
dpavlin |
103 |
ok( Frey::Test->stop_server, 'stop_server' ); |
40 |
|
|
|