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