summary refs log tree commit diff
path: root/t/basic.t
diff options
context:
space:
mode:
Diffstat (limited to 't/basic.t')
-rw-r--r--t/basic.t12
1 files changed, 8 insertions, 4 deletions
diff --git a/t/basic.t b/t/basic.t
index 29fed23..cb011f7 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -1,6 +1,7 @@
 use strict;
 use warnings;
 use Test::More;
+use JSON::XS;
 use Test::Exception;
 use AnyEvent::Riak;
 
@@ -18,14 +19,17 @@ ok my $new_bucket
 
 my $value = {
     bucket => 'foo',
-    key    => 'baz',
-    object => { foo => "bar" },
+    key    => 'bar',
+    object => { foo => "bar", baz => 1 },
     links  => []
 };
 
 ok my $res = $jiak->store($value)->recv, '... set a new key';
 
-ok $res = $jiak->fetch( 'foo', 'baz' )->recv, '... fetch our new key';
-ok $res = $jiak->delete( 'foo', 'baz' )->recv, '... delete our key';
+ok $res = $jiak->fetch( 'foo', 'bar' )->recv, '... fetch our new key';
+ok $res = $jiak->delete( 'foo', 'bar' )->recv, '... delete our key';
+
+dies_ok { $jiak->fetch( 'foo', 'foo' )->recv } '... dies when error';
+like $@, qr/404/, '... 404 response';
 
 done_testing();