2015-05-14 08:44:38 +02:00
|
|
|
#!/usr/bin/env perl -I pl/lib
|
|
|
|
|
|
|
|
use Test::More;
|
|
|
|
use JSON;
|
|
|
|
use strict;
|
|
|
|
use 5.10.0;
|
|
|
|
|
2015-05-14 08:45:03 +02:00
|
|
|
require 't/test-lib.pm';
|
2015-05-14 08:44:38 +02:00
|
|
|
|
|
|
|
my $res;
|
|
|
|
|
|
|
|
ok( $res = get('/'), 'Succeed to get /' );
|
|
|
|
my %hdrs = @{ $res->[1] };
|
2015-10-22 10:40:12 +02:00
|
|
|
ok( $res->[0] == 200, 'Return a 200 code' )
|
|
|
|
or print STDERR "Received" . Dumper($res);
|
2015-05-14 08:44:38 +02:00
|
|
|
ok( $hdrs{'Content-Type'} =~ /text\/html$/i, 'Content is declared as HTML' );
|
|
|
|
ok( $res->[2]->[0] =~ /<html/si, 'It contains a html tag' );
|
|
|
|
|
|
|
|
count(4);
|
|
|
|
|
2015-10-22 10:40:12 +02:00
|
|
|
done_testing( count() );
|
2015-05-14 08:44:38 +02:00
|
|
|
|