spec/integration/riak/http_backends_spec.rb in riak-client-1.1.1 vs spec/integration/riak/http_backends_spec.rb in riak-client-1.2.0
- old
+ new
@@ -35,9 +35,24 @@
results.should have_key 'num_found'
results['docs'].should include({"id" => "munchausen-605", "value" => "Fearless I advanced against the elephant, desirous to take alive the haughty Tippoo Sahib; but he drew a pistol from his belt, and discharged it full in my face as I rushed upon him, which did me no further harm than wound my cheek-bone, which disfigures me somewhat under my left eye. I could not withstand the rage and impulse of that moment, and with one blow of my sword separated his head from his body.\n"})
end
end
+ context "clearing bucket properties" do
+ it "should return false when unsupported", :version => "< 1.3.0" do
+ @backend.clear_bucket_props('foo').should be_false
+ end
+
+ it "should reset a previously set property to the default", :version => ">= 1.3.0" do
+ bucket = @client['bucketpropscleartest']
+ original_n = @backend.get_bucket_props(bucket)['n_val']
+ @backend.set_bucket_props(bucket, {'n_val' => 2})
+ @backend.get_bucket_props(bucket)['n_val'].should == 2
+ @backend.clear_bucket_props(bucket)
+ @backend.get_bucket_props(bucket)['n_val'].should == original_n
+ end
+ end
+
context "using Luwak", :version => "< 1.1.0" do
let(:file) { File.open(__FILE__) }
let(:key) { "spec.rb" }
let(:string) { file.read }