test/yao/resources/test_network.rb in yao-0.15.0 vs test/yao/resources/test_network.rb in yao-0.16.0
- old
+ new
@@ -35,18 +35,18 @@
assert_equal("physnet1", network.physical_network)
assert_equal("vlan", network.type)
assert_equal(1000, network.segmentation_id)
end
- def test_tenant
+ def test_project
- stub = stub_request(:get, "https://example.com:12345/tenants/0123456789abcdef0123456789abcdef")
+ stub = stub_request(:get, "https://example.com:12345/projects/0123456789abcdef0123456789abcdef")
.to_return(
status: 200,
body: <<-JSON,
{
- "tenant": {
+ "project": {
"id": "0123456789abcdef0123456789abcdef"
}
}
JSON
headers: {'Content-Type' => 'application/json'}
@@ -55,12 +55,12 @@
network = Yao::Network.new(
"project_id" => "0123456789abcdef0123456789abcdef",
"tenant_id" => "0123456789abcdef0123456789abcdef",
)
- assert_instance_of(Yao::Tenant, network.tenant)
- assert_instance_of(Yao::Tenant, network.project)
- assert_equal('0123456789abcdef0123456789abcdef', network.tenant.id)
+ assert_instance_of(Yao::Project, network.tenant)
+ assert_instance_of(Yao::Project, network.project)
+ assert_equal('0123456789abcdef0123456789abcdef', network.project.id)
assert_requested(stub)
end
def test_ports