spec/functional/watch_spec.rb in etcd-0.0.5 vs spec/functional/watch_spec.rb in etcd-0.0.6
- old
+ new
@@ -2,14 +2,14 @@
it "without index, returns the value at a particular index" do
key = random_key(4)
value1 = uuid.generate
value2 = uuid.generate
- index1 = client.set(key, value1).index
- index2 = client.set(key, value2).index
+ index1 = client.create(key, value1).node.modifiedIndex
+ index2 = client.test_and_set(key, value2, value1).node.modifiedIndex
- expect(client.watch(key, index1).value).to eq(value1)
- expect(client.watch(key, index2).value).to eq(value2)
+ expect(client.watch(key, index: index1).value).to eq(value1)
+ expect(client.watch(key, index: index2).value).to eq(value2)
end
it "with index, waits and return when the key is updated" do
response = nil
key = random_key