diff options
| author | Robin Edwards <robin.ge@gmail.com> | 2013-03-01 02:04:58 -0800 |
|---|---|---|
| committer | Robin Edwards <robin.ge@gmail.com> | 2013-03-01 02:04:58 -0800 |
| commit | 5f99cd866eb23113ea46ac78720f5608c54982ce (patch) | |
| tree | 3c35ac04f3d748942c2e973e6f42164ff02e4316 /t/25-2index.t | |
| parent | Update changelog (diff) | |
| parent | *Added secondary index support using method names from the riak python (diff) | |
| download | net-riak-5f99cd866eb23113ea46ac78720f5608c54982ce.tar.gz | |
Merge pull request #22 from Mainframe2008/master
Secondary index support
Diffstat (limited to '')
| -rw-r--r-- | t/25-2index.t | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/t/25-2index.t b/t/25-2index.t new file mode 100644 index 0000000..c6d420c --- /dev/null +++ b/t/25-2index.t @@ -0,0 +1,17 @@ +use lib 't/lib'; +use Test::More; +use Test::Riak; + +test_riak_rest { + my ($client, $bucket_name) = @_; + my $content = { field => "2index" }; + ok my $bucket = $client->bucket($bucket_name), 'got bucket test'; + ok my $obj = $bucket->new_object('2ikey', $content), + 'created a new riak object for seconday index'; + ok $obj->add_index('myindex_bin', 'value'), 'Secondary index created'; + + ok $obj->store, 'Object with secondary index stored'; + ok my $newobj->get('2ikey'), 'Object with secondary index retrieved'; + ok $newobj->remove_index('myindex_bin', 'value'), 'Secondary index removed'; + ok $newobj->store, "Object without secondary index saved"; +}
\ No newline at end of file |
