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 14, 2023
1 parent 6aef666 commit 86d171f
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ void shouldReturnPieceEventsOnGetByPieceId() {
PieceAuditEvent pieceAuditEvent = new PieceAuditEvent()
.withId(UUID.randomUUID().toString())
.withAction(PieceAuditEvent.Action.CREATE)
.withPieceId("123e4567-e89b-12d3-a456-426614174005")
.withPieceId(PIECE_ID)
.withUserId(UUID.randomUUID().toString())
.withEventDate(new Date())
.withActionDate(new Date())
Expand All @@ -142,19 +142,22 @@ void shouldReturnPieceEventsOnGetByPieceId() {
.body(containsString("pieceAuditEvents")).body(containsString("totalItems"));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS)
.get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005")
.get(ACQ_AUDIT_PIECE_PATH + PIECE_ID)
.then().log().all().statusCode(200)
.body(containsString("123e4567-e89b-12d3-a456-426614174005"));
.body(containsString(PIECE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS)
.get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005" +"?limit=1")
.get(ACQ_AUDIT_PIECE_PATH + PIECE_ID +"?limit=1")
.then().log().all().statusCode(200)
.body(containsString("123e4567-e89b-12d3-a456-426614174005"));
.body(containsString(PIECE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005" +"?sortBy=action_date").then().log().all().statusCode(200)
.body(containsString("123e4567-e89b-12d3-a456-426614174005"));
given().header(CONTENT_TYPE).header(TENANT).header(PERMS)
.get(ACQ_AUDIT_PIECE_PATH + PIECE_ID + "?sortBy=action_date")
.then().log().all().statusCode(200)
.body(containsString(PIECE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_PIECE_PATH + "123e4567-e89b-12d3-a456-426614174005" + 123).then().log().all().statusCode(500)
given().header(CONTENT_TYPE).header(TENANT).header(PERMS)
.get(ACQ_AUDIT_PIECE_PATH + PIECE_ID + 123).then().log().all().statusCode(500)
.body(containsString("UUID string too large"));
}

Expand Down

0 comments on commit 86d171f

Please sign in to comment.