public async void CreateInProductTrainingViewReturnsForbiddenWhenPermissionIsDenied() { PolicyEvaluatorMock .Setup(x => x.EvaluateAsync(It.IsAny <PolicyEvaluationContext>(), It.IsAny <CancellationToken>())) .ReturnsAsync(PermissionScope.Deny); var actual = await UserTokenBrowser.Post("/v1/inproducttraining/viewed", BuildRequest); Assert.Equal(HttpStatusCode.Forbidden, actual.StatusCode); }
public async void GetWizardViewsReturnsForbiddenWhenPermissionIsDenied() { PolicyEvaluatorMock .Setup(x => x.EvaluateAsync(It.IsAny <PolicyEvaluationContext>(), It.IsAny <CancellationToken>())) .ReturnsAsync(PermissionScope.Deny); var actual = await UserTokenBrowser.Get($"/v1/wizards/viewed/{_defaultUserId}", BuildRequest); Assert.Equal(HttpStatusCode.Forbidden, actual.StatusCode); }