test/yao/resources/test_role.rb in yao-0.8.0 vs test/yao/resources/test_role.rb in yao-0.9.0

- old
+ new

@@ -4,12 +4,12 @@ "name" => "test_role", "description" => "test_description_1" } role = Yao::Role.new(params) - assert_equal(role.name, "test_role") - assert_equal(role.description, "test_description_1") + assert_equal("test_role", role.name) + assert_equal("test_description_1", role.description) end sub_test_case 'with keystone v2.0' do def setup @@ -33,11 +33,11 @@ ) roles = Yao::Role.find_by_name("admin") assert_instance_of(Yao::Role, roles.first) - assert_equal(roles.first.id, "0123456789abcdef0123456789abcdef") + assert_equal("0123456789abcdef0123456789abcdef", roles.first.id) assert_requested(stub) end def test_resource_path stub = stub_request(:get, "https://example.com:12345/v2.0/OS-KSADM/roles"). @@ -55,11 +55,11 @@ ) roles = Yao::Role.list assert_instance_of(Yao::Role, roles.first) - assert_equal(roles.first.id, "0123456789abcdef0123456789abcdef") + assert_equal("0123456789abcdef0123456789abcdef", roles.first.id) assert_requested(stub) end def test_list_for_user stub_user @@ -77,11 +77,11 @@ JSON headers: {'Content-Type' => 'application/json'} ) roles = Yao::Role.list_for_user("test_user", on:"admin") - assert_equal(roles.first.id, "0123456789abcdef0123456789abcdef") + assert_equal("0123456789abcdef0123456789abcdef", roles.first.id) assert_received(Yao::User) { |subject| subject.get("test_user") } assert_received(Yao::Tenant) { |subject| subject.find_by_name("admin") } assert_requested(stub) end @@ -145,11 +145,11 @@ ) roles = Yao::Role.find_by_name("admin") assert_instance_of(Yao::Role, roles.first) - assert_equal(roles.first.id, "0123456789abcdef0123456789abcdef") + assert_equal("0123456789abcdef0123456789abcdef", roles.first.id) assert_requested(stub) end def test_resource_path stub = stub_request(:get, "https://example.com:12345/v3/roles"). @@ -167,11 +167,11 @@ ) roles = Yao::Role.list assert_instance_of(Yao::Role, roles.first) - assert_equal(roles.first.id, "0123456789abcdef0123456789abcdef") + assert_equal("0123456789abcdef0123456789abcdef", roles.first.id) assert_requested(stub) end def test_list_for_user stub_user @@ -189,10 +189,10 @@ JSON headers: {'Content-Type' => 'application/json'} ) roles = Yao::Role.list_for_user("test_user", on:"admin") - assert_equal(roles.first.id, "0123456789abcdef0123456789abcdef") + assert_equal("0123456789abcdef0123456789abcdef", roles.first.id) assert_received(Yao::Resources::User) { |subject| subject.get("test_user") } assert_received(Yao::Resources::Project) { |subject| subject.get("admin") } assert_requested(stub) end