public async Task Should_return_403_if_user_not_allowed_on_delete() { //Given RouteHandlers.DeleteDirectorHandler = id => DeleteDirectorRoute.Handle(id, newDirector => 1, () => false); //When var res = await this.client.DeleteAsync("/functional/directors/1"); //Then Assert.Equal(403, (int)res.StatusCode); }
public async Task Should_delete_director() { //Given RouteHandlers.DeleteDirectorHandler = id => DeleteDirectorRoute.Handle(id, newDirector => 1, () => true); //When var res = await this.client.DeleteAsync("/functional/directors/1"); //Then Assert.Equal(204, (int)res.StatusCode); }