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 aa96b19 commit 821a46a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class PieceEventsDaoImpl implements PieceEventsDao {
private static final Logger LOGGER = LogManager.getLogger();
private static final String TABLE_NAME = "acquisition_piece_log";
private static final String GET_BY_PIECE_ID_SQL = "SELECT id, action, piece_id, user_id, event_date, action_date, modified_content_snapshot, " +
private static final String GET_BY_PIECE_ID_SQL = "SELECT id, action, piece_id, user_id, event_date, action_date, modified_content_snapshot, " +
" (SELECT count(*) AS total_records FROM %s WHERE piece_id = $1) FROM %s WHERE piece_id = $1 %s LIMIT $2 OFFSET $3";
private static final String GET_STATUS_CHANGE_HISTORY_BY_PIECE_ID_SQL =
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ void shouldReturnPieceEventsOnGetByPieceId() {
// given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_PIECE_PATH + PIECE_ID).then().log().all().statusCode(200)
// .body(containsString(PIECE_ID));

given().header(CONTENT_TYPE).header(TENANT).header(PERMS).get(ACQ_AUDIT_PIECE_PATH + PIECE_ID +"?limit=1").then().log().all().statusCode(200)
.body(containsString(PIECE_ID));

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 + PIECE_ID +"?limit=1").then().log().all().statusCode(200)
// .body(containsString(PIECE_ID));
//
// 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 + PIECE_ID + 123).then().log().all().statusCode(500)
.body(containsString("UUID string too large"));
Expand Down

0 comments on commit 821a46a

Please sign in to comment.