rename tests
[MojoX-Gearman.git] / t / client.t
diff --git a/t/client.t b/t/client.t
new file mode 100755 (executable)
index 0000000..4df77c5
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env perl
+use warnings;
+use strict;
+
+use Test::More tests => 7;
+use Data::Dump qw(dump);
+use lib 'lib';
+
+use_ok 'MojoX::Gearman';
+
+my $g = new_ok 'MojoX::Gearman';
+
+ok( my $echo = $g->req( 'ECHO_REQ', "foobar" ), 'ECHO' );
+cmp_ok $echo, 'eq', "foobar";
+
+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?' );
+