diff options
author | franck cuny <franck@lumberjaph.net> | 2009-12-14 11:50:44 +0100 |
---|---|---|
committer | franck cuny <franck@lumberjaph.net> | 2009-12-14 11:50:44 +0100 |
commit | 199ebd27ee9bb66ed318ba9870b31f5ccf50887b (patch) | |
tree | 71dc5a23cd70ceef70ccd0c8f8ad1d59c07cc6d3 /t/basic.t | |
parent | w r and dw can be set (diff) | |
download | anyevent-riak-199ebd27ee9bb66ed318ba9870b31f5ccf50887b.tar.gz |
add walk method
Diffstat (limited to 't/basic.t')
-rw-r--r-- | t/basic.t | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/basic.t b/t/basic.t index cb011f7..ecb1d05 100644 --- a/t/basic.t +++ b/t/basic.t @@ -7,6 +7,8 @@ use AnyEvent::Riak; my $jiak = AnyEvent::Riak->new( host => 'http://127.0.0.1:8098', + + #host => 'http://192.168.0.11:8098', path => 'jiak' ); @@ -32,4 +34,17 @@ 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'; +ok $res = $jiak->store($value)->recv, '... set a new key'; +my $second_value = { + bucket => 'foo', + key => 'baz', + object => { foo => "bar", baz => 2 }, + links => [ [ 'foo', 'bar', 'tagged' ] ], +}; +ok $res = $jiak->store($second_value)->recv, '... set another new key'; + +ok $res = $jiak->walk( 'foo', 'baz', [ { bucket => 'foo', } ] )->recv, + '... walk'; +is $res->{results}->[0]->[0]->{key}, "bar", "... walked to bar"; + done_testing(); |