Sha256: 997aed5f9b3a336f2e104467a6aa0ae650696e645b524cc70bdd5d5fb78cbdb9

Contents?: true

Size: 949 Bytes

Versions: 19

Compression:

Stored size: 949 Bytes

Contents

class TestAggregates < TestYaoResource
  def test_server_aggregates
    params = {
      "availability_zone" => "nova",
      "deleted" => false,
      "hosts" => ["host1", "host2"],
      "metadata" => {"foo" => "bar"},
      "name" => "nova",
      "created_at" => "2015-08-27T09:49:58-05:00",
      "updated_at" => "2015-08-27T09:49:58-05:00",
      "deleted_at" => "2015-08-27T09:49:58-05:00",
    }

    aggregates = Yao::Aggregates.new(params)
    assert_equal("nova", aggregates.availability_zone)
    assert_equal(false, aggregates.deleted)
    assert_equal(["host1", "host2"], aggregates.hosts)
    assert_equal({"foo" => "bar"}, aggregates.metadata)
    assert_equal("nova", aggregates.name)
    assert_equal(Time.parse("2015-08-27T09:49:58-05:00"), aggregates.created)
    assert_equal(Time.parse("2015-08-27T09:49:58-05:00"), aggregates.updated)
    assert_equal(Date.parse("2015-08-27T09:49:58-05:00"), aggregates.deleted_at)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
yao-0.18.0 test/yao/resources/test_aggregates.rb
yao-0.17.0 test/yao/resources/test_aggregates.rb
yao-0.16.0 test/yao/resources/test_aggregates.rb
yao-0.15.0 test/yao/resources/test_aggregates.rb
yao-0.14.0 test/yao/resources/test_aggregates.rb
yao-0.13.4 test/yao/resources/test_aggregates.rb
yao-0.13.3 test/yao/resources/test_aggregates.rb
yao-0.13.2 test/yao/resources/test_aggregates.rb
yao-0.13.1 test/yao/resources/test_aggregates.rb
yao-0.13.0 test/yao/resources/test_aggregates.rb
yao-0.12.0 test/yao/resources/test_aggregates.rb
yao-0.11.3 test/yao/resources/test_aggregates.rb
yao-0.11.2 test/yao/resources/test_aggregates.rb
yao-0.11.1 test/yao/resources/test_aggregates.rb
yao-0.11.0 test/yao/resources/test_aggregates.rb
yao-0.10.1 test/yao/resources/test_aggregates.rb
yao-0.10.0 test/yao/resources/test_aggregates.rb
yao-0.9.1 test/yao/resources/test_aggregates.rb
yao-0.9.0 test/yao/resources/test_aggregates.rb