diff options
| author | Robin Edwards <robin.ge@gmail.com> | 2011-04-20 14:38:43 +0100 |
|---|---|---|
| committer | Robin Edwards <robin.ge@gmail.com> | 2011-04-20 14:38:43 +0100 |
| commit | 79bea382fd2c0753ca9ace79a11bb74c9a1d722b (patch) | |
| tree | bde42a47792a27e0a863ee527b88c8c24258f7e9 /t/04_bucket_properties.t | |
| parent | Merge remote branch 'simon/fix_link_encoding' (diff) | |
| download | net-riak-79bea382fd2c0753ca9ace79a11bb74c9a1d722b.tar.gz | |
merged pbc branch to master
Diffstat (limited to 't/04_bucket_properties.t')
| -rw-r--r-- | t/04_bucket_properties.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/04_bucket_properties.t b/t/04_bucket_properties.t new file mode 100644 index 0000000..c3b4358 --- /dev/null +++ b/t/04_bucket_properties.t @@ -0,0 +1,24 @@ +use lib 't/lib'; +use Test::More; +use Test::Riak; +use Data::Dumper; + +test_riak { + my ($client, $bucket_name) = @_; + + my $bucket = $client->bucket($bucket_name); + $bucket->allow_multiples(1); + my $props = $bucket->get_properties; + is ref($props), 'HASH', 'get properties returns a hash'; + + is $bucket->allow_multiples, 1, 'allow multiples returns true'; + + $bucket->n_val(3); + is $bucket->n_val, 3, 'n_val is set to 3'; + $bucket->set_properties({allow_mult => 0, "n_val" => 2}); + + is $bucket->allow_multiples, 0, "don't allow multiple anymore"; + is $bucket->n_val, 2, 'n_val is set to 2'; +} + + |
