]>
iEval git - plack-app-gruntmaster.git/blob - t/mech.t
6 use Test
::WWW
::Mechanize
::PSGI
;
9 use JSON
::MaybeXS qw
/decode_json/;
10 use Log
::Log4perl qw
/:easy/;
14 dbinit
'dbi:Pg:dbname=gmtest'; 1;
15 } or plan skip_all
=> 'Cannot connect to test database (gmtest).'. "Error: $@";
19 Log
::Log4perl
->easy_init($OFF);
20 my $mech = Test
::WWW
::Mechanize
::PSGI
->new(app
=> do 'app.psgi');
23 $mech->title_is('Gruntmaster 6000', 'title');
25 $mech->get_ok('/pb/');
26 $mech->title_is('Problems', 'title');
28 $mech->get_ok('/pb/arc');
29 $mech->title_is('Problem in archive', 'title');
31 $mech->get_ok('/ct/');
32 $mech->title_is('Contests', 'title');
34 $mech->get_ok('/ct/fc');
35 $mech->title_is('Finished contest');
37 $mech->get_ok('/log/');
38 $mech->title_is('Job log', 'title');
40 $mech->get_ok('/log/1');
41 $mech->title_is('Job 1', 'title');
43 $mech->get_ok('/us/');
44 $mech->title_is('Users', 'title');
46 $mech->get_ok('/us/MGV');
47 # testdata.sql does not set name for users, therefore not checking title
48 #$mech->title_is('Marius Gavrilescu', 'title');
50 $mech->get_ok('/src/1.c');
52 $mech->get_ok('/st/fc');
53 $mech->title_is('Standings', 'title');
55 $mech->get_ok('/ed/fc');
56 $mech->title_is('Editorial of Finished contest', 'title');
This page took 0.053328 seconds and 4 git commands to generate.