2016-01-07 12:40:24 +01:00
|
|
|
# Verify just that '/' requests returns HTML
|
2015-05-14 08:44:38 +02:00
|
|
|
|
|
|
|
use Test::More;
|
|
|
|
use strict;
|
|
|
|
|
2015-05-14 08:45:03 +02:00
|
|
|
require 't/test-lib.pm';
|
2015-05-14 08:44:38 +02:00
|
|
|
|
|
|
|
my $res;
|
|
|
|
|
2016-01-01 20:55:35 +01:00
|
|
|
ok( $res = &client->_get('/'), 'Succeed to get /' );
|
2015-05-14 08:44:38 +02:00
|
|
|
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' );
|
2019-07-02 20:03:40 +02:00
|
|
|
ok( $res->[2]->[0] =~ /<html/si, 'It contains a html tag' );
|
2015-05-14 08:44:38 +02:00
|
|
|
|
|
|
|
count(4);
|
|
|
|
|
2015-10-22 10:40:12 +02:00
|
|
|
done_testing( count() );
|
2015-05-14 08:44:38 +02:00
|
|
|
|