test/yao/resources/test_loadbalancer_healthmonitor.rb in yao-0.3.6 vs test/yao/resources/test_loadbalancer_healthmonitor.rb in yao-0.3.7
- old
+ new
@@ -1,15 +1,15 @@
-require "date"
+require "time"
class TestRole < Test::Unit::TestCase
def test_loadbalancer_healtchmonitor
params = {
"name" => "super-pool-health-monitor",
"admin_state_up" => true,
- "created_at" => "2017-05-11T23 =>53 =>47",
+ "created_at" => "2017-05-11T23:53:47",
"provisioning_status" => "ACTIVE",
- "updated_at" => "2017-05-11T23 =>53 =>47",
+ "updated_at" => "2017-05-11T23:53:47",
"delay" => 10,
"expected_codes" => "200",
"max_retries" => 1,
"http_method" => "GET",
"timeout" => 5,
@@ -20,12 +20,12 @@
}
healthmonitor = Yao::LoadBalancerHealthMonitor.new(params)
assert_equal(healthmonitor.name, "super-pool-health-monitor")
assert_equal(healthmonitor.admin_state_up, true)
- assert_equal(healthmonitor.created_at, Date.parse("2017-05-11T23:53:47"))
+ assert_equal(healthmonitor.created, Time.parse("2017-05-11T23:53:47"))
assert_equal(healthmonitor.provisioning_status, "ACTIVE")
- assert_equal(healthmonitor.updated_at, Date.parse("2017-05-11T23:53:47"))
+ assert_equal(healthmonitor.updated, Time.parse("2017-05-11T23:53:47"))
assert_equal(healthmonitor.delay, 10)
assert_equal(healthmonitor.expected_codes, "200")
assert_equal(healthmonitor.max_retries, 1)
assert_equal(healthmonitor.http_method, "GET")
assert_equal(healthmonitor.timeout, 5)