summaryrefslogtreecommitdiff
path: root/t/basic.t
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2009-12-13 17:23:54 +0100
committerfranck cuny <franck@lumberjaph.net>2009-12-13 17:23:54 +0100
commit44c205ea1550adfeda2b013ef3504b7d6f918f41 (patch)
tree541bbf922baa41af352182787470ebf7cc45f6e2 /t/basic.t
parentupdate POD (diff)
downloadanyevent-riak-44c205ea1550adfeda2b013ef3504b7d6f918f41.tar.gz
w r and dw can be set
Diffstat (limited to '')
-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();