public async Task IncludeSlideReturnsCreatedAndLocation() { var command = new IncludeSlideInStudy { StudyId = Guid.NewGuid().ToString("n"), SlideId = Guid.NewGuid().ToString("n") }; var response = await _server.CreateClient().SendJsonPost($"/studies/{command.StudyId}/slides", command); response.StatusCode.Should().Be(StatusCodes.Status201Created); response.Headers.Location.Should().Be($"/studies/{command.StudyId}/slides/{command.SlideId}"); }
public async Task <ActionResult> IncludeSlide(IncludeSlideInStudy command) { await _handlers.Handle(command); return(Created($"/studies/{command.StudyId}/slides/{command.SlideId}", null)); }