public async Task Update_GroupCode_Close() { FillData(); var update = new UpdateGroupCodeCommand { Open = true }; var response = await HttpClient.PutAsync($"/groupcodes/{_newGroupCode.Id}", new StringContent(JsonConvert.SerializeObject(update), Encoding.UTF8, "application/json")); response.StatusCode.Should().Be(HttpStatusCode.NoContent); RefreshContext(); var groupCodeCheck = Context.GroupCodes.First(); groupCodeCheck.Detail.Should().NotBeNullOrWhiteSpace(); groupCodeCheck.Open.Should().Be(update.Open); }
public async Task <IActionResult> UpdateGroupCode([FromRoute] int groupCodeId, UpdateGroupCodeCommand command) { command.GroupCodeId = groupCodeId; return(await _iMediator.Send(command)); }