Skip to content
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

Merged
merged 6 commits into from
Aug 10, 2023

Conversation

zzokki81
Copy link
Contributor

@zzokki81 zzokki81 commented Aug 9, 2023

Add tests to see if admin user have correct root role.

Resolves #259

Signed-off-by: zzokki81 <zoran.rebic@outlook.com>
@@ -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))
Copy link
Contributor

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

@@ -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)
Copy link
Contributor

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>
Copy link
Contributor

@manuio manuio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manuio manuio merged commit 50537dd into MainfluxLabs:master Aug 10, 2023
1 check passed
@zzokki81 zzokki81 deleted the viewadmin_tests branch October 24, 2023 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add view admin user tests
2 participants