Sha256: 6c36a54a2ed0981dea00fda93c8f4a80c6005e7f0d78c144e4786b18e91f88f5

Contents?: true

Size: 731 Bytes

Versions: 2

Compression:

Stored size: 731 Bytes

Contents

require "integration/test_helper"

describe "Meging Entities" do
  after do
    TableNameHelper.clean
  end

  before do
    @table = Azure::Tables::Table.create(TableNameHelper.name)
    @entity = Azure::Tables::Entity.new(
      "PartitionKey" => "part1",
      "RowKey"       => "row1",
      "Address"      => "Mountain View",
      "FirstName"    => "John",
      "Email"        => "john@example.com"
    )
    @table.insert(@entity)
  end

  it "should be able to merge the entity directly against Table Service and preserve old not updated fields" do
    result = @entity.merge("Address" => "New York")

    result.must_equal true

    @entity["Address"].must_equal "New York"
    @entity["FirstName"].wont_be_nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
azure-0.1.1 test/integration/tables/merge_entity_test.rb
azure-0.1.0 test/integration/tables/merge_entity_test.rb