Skip to content

Commit

Permalink
fix : 각 테스트마다 Repository deleteAll
Browse files Browse the repository at this point in the history
  • Loading branch information
kkangh00n committed Jan 10, 2024
1 parent 0f8d07a commit acb72b8
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.prgrms.catchtable.shop.dto.request.ShopSearchCondition;
import com.prgrms.catchtable.shop.fixture.ShopFixture;
import java.util.List;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -21,6 +22,11 @@ class ShopRepositoryTest {
@Autowired
private ShopRepository shopRepository;

@BeforeEach
void init() {
shopRepository.deleteAll();
}

@Test
@DisplayName("이름 검색을 통해 Shop을 조회할 수 있다.")
void findNameSearchTest() {
Expand Down

0 comments on commit acb72b8

Please sign in to comment.