diff --git a/test/proxy/request_rewriting/test_adds_roles_header.rb b/test/proxy/request_rewriting/test_adds_roles_header.rb index 480bfa341..78f8eb45d 100644 --- a/test/proxy/request_rewriting/test_adds_roles_header.rb +++ b/test/proxy/request_rewriting/test_adds_roles_header.rb @@ -38,7 +38,12 @@ def test_comma_delimits_multiple_roles })) assert_response_code(200, response) data = MultiJson.load(response.body) - assert_equal("private,foo,bar", data["headers"]["x-api-roles"]) + assert(data["headers"]["x-api-roles"]) + assert_equal([ + "bar", + "foo", + "private", + ].sort, data["headers"]["x-api-roles"].split(",").sort) end def test_strips_forged_values