-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MF-259 - Add view admin user tests #273
Conversation
Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
users/service_test.go
Outdated
@@ -204,7 +214,8 @@ func TestViewProfile(t *testing.T) { | |||
} | |||
|
|||
for desc, tc := range cases { | |||
_, err := svc.ViewProfile(context.Background(), tc.token) | |||
p, err := svc.ViewProfile(context.Background(), tc.token) | |||
assert.Equal(t, tc.role, p.Role, fmt.Sprintf("%s: expected %s got %s\n", desc, tc.role, p.Role)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ok but better compare the User, not only the role
users/service_test.go
Outdated
@@ -204,7 +214,8 @@ func TestViewProfile(t *testing.T) { | |||
} | |||
|
|||
for desc, tc := range cases { | |||
_, err := svc.ViewProfile(context.Background(), tc.token) | |||
p, err := svc.ViewProfile(context.Background(), tc.token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
u
or user
instead of p
Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Add tests to see if admin user have correct
root
role.Resolves #259