Skip to content
Snippets Groups Projects
Commit b859a1b6 authored by Rohith's avatar Rohith
Browse files

- fixing up the tests for now

parent 6ea4f6a2
No related branches found
No related tags found
No related merge requests found
...@@ -46,16 +46,9 @@ func TestGetUserContext(t *testing.T) { ...@@ -46,16 +46,9 @@ func TestGetUserContext(t *testing.T) {
"resource_access": map[string]interface{}{ "resource_access": map[string]interface{}{
"openvpn": map[string]interface{}{ "openvpn": map[string]interface{}{
"roles": []string{ "roles": []string{
"vpn-user",
"dev-vpn", "dev-vpn",
}, },
}, },
"account": map[string]interface{}{
"roles": []string{
"view-profile",
"manage-account",
},
},
}, },
"email": "gambol99@gmail.com", "email": "gambol99@gmail.com",
"name": "Rohith Jayawardene", "name": "Rohith Jayawardene",
...@@ -77,7 +70,7 @@ func TestGetUserContext(t *testing.T) { ...@@ -77,7 +70,7 @@ func TestGetUserContext(t *testing.T) {
assert.Equal(t, "1e11e539-8256-4b3b-bda8-cc0d56cddb48", context.id) assert.Equal(t, "1e11e539-8256-4b3b-bda8-cc0d56cddb48", context.id)
assert.Equal(t, "gambol99@gmail.com", context.email) assert.Equal(t, "gambol99@gmail.com", context.email)
assert.Equal(t, "rjayawardene", context.preferredName) assert.Equal(t, "rjayawardene", context.preferredName)
roles := []string{"account:view-profile", "account:manage-account", "openvpn:vpn-user", "openvpn:dev-vpn"} roles := []string{"openvpn:dev-vpn"}
if !reflect.DeepEqual(context.roles, roles) { if !reflect.DeepEqual(context.roles, roles) {
t.Errorf("the claims are not the same, %v <-> %v", context.roles, roles) t.Errorf("the claims are not the same, %v <-> %v", context.roles, roles)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment