Skip to content

Commit 8b38af5

Browse files
abrilgzzdanielluo-msft
authored andcommitted
Update RolesControllerTests
1 parent 2dd37bd commit 8b38af5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Service/GroupMembershipManagement/Hosts/WebApi/WebApi.Tests/RolesControllerTests.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ public void GetAllRolesStatus_ForVariousUsers()
2727
var claims = new List<Claim>
2828
{
2929
new Claim(ClaimTypes.Role, Roles.JOB_OWNER_WRITER),
30-
new Claim(ClaimTypes.Role, Roles.HYPERLINK_ADMINISTRATOR)
30+
new Claim(ClaimTypes.Role, Roles.JOB_OWNER_READER),
31+
new Claim(ClaimTypes.Role, Roles.JOB_TENANT_READER),
32+
new Claim(ClaimTypes.Role, Roles.JOB_TENANT_WRITER),
33+
new Claim(ClaimTypes.Role, Roles.SUBMISSION_REVIEWER),
34+
new Claim(ClaimTypes.Role, Roles.HYPERLINK_ADMINISTRATOR),
35+
new Claim(ClaimTypes.Role, Roles.CUSTOM_MEMBERSHIP_PROVIDER_ADMINISTRATOR),
3136
};
3237

3338
_rolesController.ControllerContext = CreateControllerContext(claims);
@@ -40,7 +45,12 @@ public void GetAllRolesStatus_ForVariousUsers()
4045
var rolesStatuses = okResult.Value as RolesObject;
4146
Assert.IsNotNull(rolesStatuses);
4247
Assert.IsTrue(rolesStatuses.IsJobOwnerWriter);
48+
Assert.IsTrue(rolesStatuses.IsJobOwnerReader);
49+
Assert.IsTrue(rolesStatuses.IsJobTenantReader);
50+
Assert.IsTrue(rolesStatuses.IsJobTenantWriter);
51+
Assert.IsTrue(rolesStatuses.IsSubmissionReviewer);
4352
Assert.IsTrue(rolesStatuses.IsHyperlinkAdministrator);
53+
Assert.IsTrue(rolesStatuses.IsCustomMembershipProviderAdministrator);
4454
}
4555

4656
private ControllerContext CreateControllerContext(List<Claim> claims)

0 commit comments

Comments
 (0)