From: Marius Gavrilescu Date: Sat, 12 Mar 2016 20:02:54 +0000 (+0000) Subject: Update tests for the new rerun command X-Git-Tag: 5999.000_016~2 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=d68b9d2003fc0e28f9ae52508c16f0d1a0a6560c;p=gruntmaster-data.git Update tests for the new rerun command --- diff --git a/t/tools.t b/t/tools.t index 6a08457..077185d 100644 --- a/t/tools.t +++ b/t/tools.t @@ -115,6 +115,10 @@ ta [rerun => $id]; is job_entry($id)->{result}, -2, "gm rerun $id"; ta [qw/rm -j/, $id]; +ta [rerun => 'fca']; +my @fca_jobs = grep { $_->{problem} eq 'fca' } @{job_list()}; +ok ((!grep { $_->{result} != -2 } @fca_jobs), "gm rerun fca"); + sub terr { my ($args, $err) = @_; my $ret = test_app 'Gruntmaster::App' => $args; @@ -128,8 +132,7 @@ terr [qw/-c add/], 'Wrong number of arguments'; terr [qw/get/], 'No table selected'; terr [qw/-c get/], 'Wrong number of arguments'; terr [qw/list/], 'No table selected'; -terr [qw/-p rerun/], 'This command only works on jobs'; -terr [qw/-j rerun/], 'Wrong number of arguments'; +terr [qw/-j rerun/], 'Not enough arguments'; terr [qw/rm/], 'No table selected'; terr [qw/-j rm/], 'Wrong number of arguments'; terr [qw/set/], 'No table selected';