diff options
| author | franck cuny <franck@lumberjaph.net> | 2009-12-13 17:23:54 +0100 |
|---|---|---|
| committer | franck cuny <franck@lumberjaph.net> | 2009-12-13 17:23:54 +0100 |
| commit | 44c205ea1550adfeda2b013ef3504b7d6f918f41 (patch) | |
| tree | 541bbf922baa41af352182787470ebf7cc45f6e2 /t | |
| parent | update POD (diff) | |
| download | anyevent-riak-44c205ea1550adfeda2b013ef3504b7d6f918f41.tar.gz | |
w r and dw can be set
Diffstat (limited to 't')
| -rw-r--r-- | t/basic.t | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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(); |
