Skip to content

Commit

Permalink
[MODAUD-174] - Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Nov 10, 2023
1 parent 3262ab6 commit 42fbbad
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.folio.dao.acquisition.impl.PieceEventsDaoImpl;
import org.folio.rest.jaxrs.model.OrderAuditEvent;
import org.folio.rest.jaxrs.model.OrderLineAuditEvent;
import org.folio.rest.jaxrs.model.PieceAuditEvent;
import org.folio.util.PostgresClientFactory;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -117,7 +118,17 @@ void shouldReturnOrderLineEventsOnGetByOrderLineId() {

@Test
void shouldReturnPieceEventsOnGetByPieceId() {
var pieceAuditEvent = createPieceAuditEvent(UUID.randomUUID().toString());
JsonObject jsonObject = new JsonObject();
jsonObject.put("name","Test Product2");

PieceAuditEvent pieceAuditEvent = new PieceAuditEvent()
.withId(UUID.randomUUID().toString())
.withAction(PieceAuditEvent.Action.CREATE)
.withPieceId(PIECE_ID)
.withUserId(UUID.randomUUID().toString())
.withEventDate(new Date())
.withActionDate(new Date())
.withPieceSnapshot(jsonObject);

pieceEventsDao.save(pieceAuditEvent, TENANT_ID);

Expand Down

0 comments on commit 42fbbad

Please sign in to comment.