first worker
[MojoX-Gearman.git] / t / gearman.t
index 0e2676f..4df77c5 100755 (executable)
@@ -2,7 +2,7 @@
 use warnings;
 use strict;
 
-use Test::More tests => 5;
+use Test::More tests => 7;
 use Data::Dump qw(dump);
 use lib 'lib';
 
@@ -10,9 +10,12 @@ use_ok 'MojoX::Gearman';
 
 my $g = new_ok 'MojoX::Gearman';
 
-ok( my $echo = $g->req( 16, "foobar" ), 'ECHO' );
+ok( my $echo = $g->req( 'ECHO_REQ', "foobar" ), 'ECHO' );
 cmp_ok $echo, 'eq', "foobar";
 
-ok( my $ping = $g->req( 7, 'ping', '', 'bla' ), 'SUBMIT_JOB' );
+ok( my $ping = $g->req( 'SUBMIT_JOB', 'ping', '', 'bla' ), 'SUBMIT_JOB' );
+like $ping, qr/pong/, 'got pong';
 diag dump $ping;
 
+ok( $g->req( 'ECHO_REQ', "alive" ), 'ECHO - still alive - still alive?' );
+