test/yao/resources/test_role_assignment.rb in yao-0.8.0 vs test/yao/resources/test_role_assignment.rb in yao-0.9.0
- old
+ new
@@ -19,19 +19,19 @@
"id" => "313233"
}
}
role_assignment = Yao::RoleAssignment.new(params)
- assert_equal(role_assignment.scope, { "project" => { "id" => "456789" } })
+ assert_equal({ "project" => { "id" => "456789" } }, role_assignment.scope)
# map_attribute_to_resource
assert_instance_of(Yao::Resources::Role, role_assignment.role)
- assert_equal(role_assignment.role.id, "123456")
+ assert_equal("123456", role_assignment.role.id)
# map_attribute_to_resource
assert_instance_of(Yao::Resources::User, role_assignment.user)
- assert_equal(role_assignment.user.id, "313233")
+ assert_equal("313233", role_assignment.user.id)
end
def test_project
stub = stub_request(:get, "http://example.com:12345/tenants/456789").
to_return(
@@ -54,10 +54,10 @@
},
}
role_assignment = Yao::RoleAssignment.new(params)
assert_instance_of(Yao::Resources::Tenant, role_assignment.project)
- assert_equal(role_assignment.project.id, "456789")
+ assert_equal("456789", role_assignment.project.id)
assert_requested(stub)
end
end