Skip to content

Commit

Permalink
refactor: change ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
aiaiaiai1 committed Dec 9, 2024
1 parent 468fbf2 commit a54f71b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ default WorkoutHistory getByWorkoutConfirmationId(Long workoutConfirmationId) {
"FROM objection as o " +
"join worker as wo on o.worker_id = wo.id " +
"where wo.workspace_id =:workspaceId " +
"ORDER BY createdAt DESC " +
"ORDER BY createdAt ASC " +
"LIMIT 10 OFFSET :pageNumber")
List<Map<String, Object>> getWorkoutConfirmationAndObjection(Long workspaceId, int pageNumber);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,11 @@ class WorkspaceQueryServiceTest extends IntegrationTest {
assertThat(responses).hasSize(3);

WorkoutConfirmationOrObjectionResponse response = responses.get(0);
assertThat(response.getIsMine()).isEqualTo(true);
assertThat(response.getProfileImageUrl()).isEqualTo(user.getProfileImageName());
assertThat(response.getWorkoutConfirmationId()).isEqualTo(workoutHistory1.getWorkoutConfirmation().getId());
assertThat(response.getIsMine()).isEqualTo(false);
assertThat(response.getProfileImageUrl()).isEqualTo(creator.getProfileImageName());
assertThat(response.getWorkoutConfirmationId()).isEqualTo(workoutHistory.getWorkoutConfirmation().getId());
assertThat(response.getIsObjection()).isEqualTo(false);
assertThat(response.getObjectionId()).isEqualTo(null);
assertThat(response.getObjectionId()).isEqualTo(1L);

WorkoutConfirmationOrObjectionResponse response1 = responses.get(1);
assertThat(response1.getNickname()).isEqualTo(creator.getNickname());
Expand Down

0 comments on commit a54f71b

Please sign in to comment.