test/integration/table/update_entity_test.rb in azure-0.7.0 vs test/integration/table/update_entity_test.rb in azure-0.7.1
- old
+ new
@@ -19,12 +19,12 @@
describe Azure::Table::TableService do
describe "#update_entity" do
subject { Azure::Table::TableService.new }
let(:table_name){ TableNameHelper.name }
- let(:entity_properties){
- {
+ let(:entity_properties){
+ {
"PartitionKey" => "testingpartition",
"RowKey" => "abcd1234_existing",
"CustomStringProperty" => "CustomPropertyValue",
"CustomIntegerProperty" => 37,
"CustomBooleanProperty" => true,
@@ -48,22 +48,22 @@
assert exists, "cannot verify existing record"
}
after { TableNameHelper.clean }
- it "updates an existing entity, removing any properties not included in the update operation" do
- etag = subject.update_entity table_name, {
+ it "updates an existing entity, removing any properties not included in the update operation" do
+ etag = subject.update_entity table_name, {
"PartitionKey" => entity_properties["PartitionKey"],
"RowKey" => entity_properties["RowKey"],
"NewCustomProperty" => "NewCustomValue"
}
etag.must_be_kind_of String
etag.wont_equal @existing_etag
result = subject.get_entity table_name, entity_properties["PartitionKey"], entity_properties["RowKey"]
-
+
result.must_be_kind_of Azure::Table::Entity
result.table.must_equal table_name
# removed all existing props
entity_properties.each { |k,v|
@@ -72,21 +72,21 @@
# and has the new one
result.properties["NewCustomProperty"].must_equal "NewCustomValue"
end
- it "updates an existing entity, removing any properties not included in the update operation and adding nil one" do
- etag = subject.update_entity table_name, {
+ it "updates an existing entity, removing any properties not included in the update operation and adding nil one" do
+ etag = subject.update_entity table_name, {
"PartitionKey" => entity_properties["PartitionKey"],
"RowKey" => entity_properties["RowKey"],
"NewCustomProperty" => nil
}
etag.must_be_kind_of String
etag.wont_equal @existing_etag
result = subject.get_entity table_name, entity_properties["PartitionKey"], entity_properties["RowKey"]
-
+
result.must_be_kind_of Azure::Table::Entity
result.table.must_equal table_name
# removed all existing props
entity_properties.each { |k,v|
\ No newline at end of file