Skip to content

Commit

Permalink
[NAYB-8] test: Item 조회로직 변경에 따른 테스트 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Seongju-Lee committed Sep 15, 2023
1 parent 67b793c commit 8e0a737
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void findByPriceGreaterThanAndMainCategoryOrderByPriceAscItemIdDesc() {
}

@Test
@DisplayName("아이템 삭제 시, update 쿼리가 발생한다.")
@DisplayName("아이템 삭제 시, 아이템 조회가 안된다.")
public void deleteItem() {
// Given
MainCategory mainCategory = new MainCategory("main");
Expand All @@ -189,9 +189,6 @@ public void deleteItem() {

// Then
Optional<Item> findItem = itemRepository.findByItemId(savedItem.getItemId());
assertThat(findItem.isEmpty()).isEqualTo(false);
assertThat(savedItem.getItemId()).isEqualTo(findItem.get().getItemId());
assertThat(savedItem.isDeleted()).isEqualTo(false);
assertThat(findItem.get().isDeleted()).isEqualTo(true);
assertThat(findItem.isEmpty()).isEqualTo(true);
}
}

0 comments on commit 8e0a737

Please sign in to comment.