public async Task ThenIShouldNotBeAllowedToGetANewInvitationIfIAmNotAnOwnerOfTheAccount(Role userRole, HttpStatusCode status) { //Arrange const string hashAccountId = "123ABC"; const string externalUserId = "1234"; _mediator.Setup(x => x.SendAsync(It.IsAny <GetUserAccountRoleQuery>())) .ReturnsAsync(new GetUserAccountRoleResponse { UserRole = userRole }); //Act var result = await _orchestrator.GetNewInvitation(hashAccountId, externalUserId); //Assert Assert.AreEqual(status, result.Status); }
public async Task <ActionResult> Invite(string hashedAccountId) { var response = await _employerTeamOrchestrator.GetNewInvitation(hashedAccountId, OwinWrapper.GetClaimValue(@"sub")); return(View(response)); }
public async Task <ActionResult> Invite(string hashedAccountId) { var response = await _employerTeamOrchestrator.GetNewInvitation(hashedAccountId, OwinWrapper.GetClaimValue(ControllerConstants.UserRefClaimKeyName)); return(View(response)); }