]> iEval git - gruntmaster-data.git/blame - t/Gruntmaster-Data.t
Remove no longer useful is_private and is_in_archive methods
[gruntmaster-data.git] / t / Gruntmaster-Data.t
CommitLineData
1ce4e27c
MG
1#!/usr/bin/perl -w
2use v5.14;
bbf8209c 3
f20668d7 4use Test::More tests => 6;
bbf8209c 5
bbf8209c 6BEGIN { use_ok('Gruntmaster::Data') };
acb202c6
MG
7
8my $db = Gruntmaster::Data->connect('dbi:SQLite:dbname=:memory:');
9$db->deploy;
10
11$db->users->create({id => 'MGV'});
12$db->contests->create({id => 'fc', start => 10, stop => 20, name => 'Finished contest', owner => 'MGV'});
13$db->contests->create({id => 'rc', start => 20, stop => 30, name => 'Running contest', owner => 'MGV'});
14$db->contests->create({id => 'pc', start => 30, stop => 40, name => 'Pending contest', owner => 'MGV'});
15
16ok $db->contest('pc')->is_pending(25), 'is_pending';
17ok !$db->contest('rc')->is_pending(25), '!is_pending';
18ok $db->contest('fc')->is_finished(25), 'is_finished';
19ok !$db->contest('rc')->is_finished(25), '!is_finished';
20ok $db->contest('rc')->is_running(25), 'is_running';
This page took 0.029162 seconds and 4 git commands to generate.