示例#1
0
 public async Task GetJourneys_AsAdmin_ShouldReturnForbidden_WhenNoAccessToPlant()
 => await JourneysControllerTestsHelper.GetJourneysAsync(
     UserType.LibraryAdmin, TestFactory.PlantWithoutAccess,
     HttpStatusCode.Forbidden);
示例#2
0
 public async Task GetJourneys_AsAnonymous_ShouldReturnUnauthorized()
 => await JourneysControllerTestsHelper.GetJourneysAsync(
     UserType.Anonymous, TestFactory.UnknownPlant,
     HttpStatusCode.Unauthorized);
示例#3
0
 public async Task GetJourneys_AsAdmin_ShouldReturnBadRequest_WhenUnknownPlant()
 => await JourneysControllerTestsHelper.GetJourneysAsync(
     UserType.LibraryAdmin, TestFactory.UnknownPlant,
     HttpStatusCode.BadRequest,
     "is not a valid plant");
示例#4
0
 public async Task GetJourneys_AsPreserver_ShouldReturnForbidden_WhenPermissionMissing()
 => await JourneysControllerTestsHelper.GetJourneysAsync(
     UserType.Preserver, TestFactory.PlantWithAccess,
     HttpStatusCode.Forbidden);