spec/integration/riak/crdt_spec.rb in riak-client-2.2.1 vs spec/integration/riak/crdt_spec.rb in riak-client-2.2.2
- old
+ new
@@ -217,9 +217,21 @@
end
expect(subject.maps['road'].counters['speedbumps'].value).to eq 4
expect(subject.maps['road'].sets['signs'].include? 'yield').to be
end
+
+ it 'deletes nested inner-map' do
+ bag_map = subject.maps['bag']
+ inner_map = bag_map.maps['123']
+ inner_map.registers['name'] = 'f1'
+
+ expect(subject.maps['bag'].maps['123'].registers['name']).to eq 'f1'
+
+ expect{ bag_map.maps.delete('123') }.to_not raise_error
+ expect(bag_map.maps.include? '123').to_not be
+ expect(bag_map.maps['123'].registers['name']).to_not be
+ end
end
describe 'containing a register' do
it 'bubbles straightforward register ops up' do
subject.registers['hkey_local_machine'] = 'registry'