02-HTML-template.t 456 Bytes
Newer Older
1 2 3 4 5 6
#!/usr/bin/env perl -I pl/lib

use Test::More;
use strict;
use 5.10.0;

Xavier Guimard's avatar
Xavier Guimard committed
7
require 't/test-lib.pm';
8 9 10 11 12

my $res;

ok( $res = get('/'), 'Succeed to get /' );
my %hdrs = @{ $res->[1] };
Clément OUDOT's avatar
Clément OUDOT committed
13 14
ok( $res->[0] == 200, 'Return a 200 code' )
  or print STDERR "Received" . Dumper($res);
15 16 17 18 19
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);

Clément OUDOT's avatar
Clément OUDOT committed
20
done_testing( count() );
21