blob: 9de6fb9629d0faba71b0091478b5d883f8abbf36 [file] [log] [blame]
Nils Diewald034ea702015-01-16 19:41:52 +00001use Mojo::Base -strict;
2use lib '../lib', 'lib';
3use Test::More;
4use Test::Mojo;
5
6my $t = Test::Mojo->new('Korap');
7$t->get_ok('/')
8 ->status_is(200)
9 ->text_is('title', 'KorAP')
10 ->text_like('h1 span', qr/Korpusanalyseplattform/i)
11 ;
12
13# Check paging
14$t->get_ok('/?q=test')
15 ->text_is('pre.query.serial span', 'JSON-LD Serialization for "test"')
16 ->text_like('#total-results', qr/\d+ matches$/)
17 ->text_is('#pagination a[rel=self] span', 1)
18;
19
20# Check paging
21$t->get_ok('/?q=test&p=2')
22 ->text_is('pre.query.serial span', 'JSON-LD Serialization for "test"')
23 ->text_like('#total-results', qr/\d+ matches$/)
24 ->text_is('#pagination a[rel=self] span', 2)
25;
26
27# $t->get_ok('/tutorial?testing=1')
28# ->text_like('div.test p.pass', qr/Pass: [1-9]/)
29# ;
30
31done_testing();