public async Task <IActionResult> ArquivarPorIds(ArquivarLogPayload arquivarLogPayload) { await _logAppService.Arquivar(arquivarLogPayload.Ids); if (_notificationHandler.TemNotificacao()) { return(BadRequest(_notificationHandler.ObterNotificacoes())); } return(Ok()); }
public async Task ArquivarPorIds_DeveRetornarErroQuandoLogsNaoExistirem() { await _polarisLogFixture.RealizarLogin(); _polarisLogFixture.Client.AtribuirToken(_polarisLogFixture.AccessToken); var arquivarLogPayload = new ArquivarLogPayload { Ids = new[] { Guid.NewGuid() } }; var response = await _polarisLogFixture.Client.PutAsJsonAsync("Logs", arquivarLogPayload); response.StatusCode.Should().Be(HttpStatusCode.BadRequest); }