X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F08yaml.t;fp=t%2F08yaml.t;h=e54efb181062ae1ad3458d7d0eebf31fea558ec2;hb=ecf6a0628b79b16e8c5b914d88757300b0197a7f;hp=6d7d7eaadff1269b13dfac992d9f5eccf6968399;hpb=695ab6029903fee829be5c03884ad6e5ea176b02;p=catagits%2FCatalyst-Plugin-Scheduler.git diff --git a/t/08yaml.t b/t/08yaml.t index 6d7d7ea..e54efb1 100644 --- a/t/08yaml.t +++ b/t/08yaml.t @@ -8,7 +8,7 @@ use lib "$FindBin::Bin/lib"; use Test::More; use Storable qw/lock_store lock_retrieve/; -plan tests => 3; +plan tests => 6; use Catalyst::Test 'TestApp'; our $STATE = "$FindBin::Bin/lib/TestApp/scheduler.state"; @@ -29,3 +29,11 @@ TestApp->config->{scheduler}->{yaml_file} unlink "$FindBin::Bin/lib/TestApp/every_minute.log"; } +# test that a YAML trigger works +{ + ok( my $res = request('http://localhost/?schedule_trigger=some_long_trigger_name'), 'request ok' ); + is( $res->content, 'default', 'response ok' ); + is( -e "$FindBin::Bin/lib/TestApp/every_minute.log", 1, 'every_minute executed ok' ); + unlink "$FindBin::Bin/lib/TestApp/every_minute.log"; +} +