BEGIN {
eval {
- Gruntmaster::Data::init 'dbi:Pg:dbname=gmtest'; 1;
+ dbinit 'dbi:Pg:dbname=gmtest'; 1;
} or plan skip_all => 'Cannot connect to test database. Create it by running createdb gmtest before running this test. '. "Error: $@";
plan tests => 33;
}
$x = job_entry 7;
ok !defined $x->{result}, 'job_entry 7 has NULL result';
+open_problem qw/fc fca MGV/, contest_entry('fc')->{start} + 300;
+
$x = standings 'fc';
-is_deeply $x, {
- problems => [[fca => 'FC problem A']],
- st => [
- {rank => 1, user => 'MGV', user_name => undef, score => 50, scores => [50]},
- {rank => 2, user => 'nobody', user_name => undef, score => 40, scores => [40]},
- ]
-}, 'standings fc';
+
+is_deeply $x, [
+ {rank => 1, user => 'MGV', user_name => undef, score => 80, scores => [80]},
+ {rank => 2, user => 'nobody', user_name => undef, score => 40, scores => [40]},
+], 'standings fc';
+
+db->delete('opens', {contest => 'fc', problem => 'fca', owner => 'MGV'});