Skip to content

Commit

Permalink
SLVUU: Add database clearing before each ApplicationLayoutIT
Browse files Browse the repository at this point in the history
  • Loading branch information
cfisher-scottlogic committed Nov 27, 2023
1 parent af3e6ae commit 9ed74e2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.finos.vuu.layoutserver.model.ApplicationLayout;
import org.finos.vuu.layoutserver.repository.ApplicationLayoutRepository;
import org.finos.vuu.layoutserver.utils.DefaultApplicationLayoutLoader;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
Expand Down Expand Up @@ -48,6 +49,11 @@ public class ApplicationLayoutIntegrationTest {
private DefaultApplicationLayoutLoader mockLoader;
private final DefaultApplicationLayoutLoader realLoader = new DefaultApplicationLayoutLoader();

@BeforeEach
public void setUp() {
repository.deleteAll();
}

@Test
public void getApplicationLayout_noLayoutExists_returns200WithDefaultLayout() throws Exception {
when(mockLoader.getDefaultLayout()).thenReturn(realLoader.getDefaultLayout());
Expand Down

0 comments on commit 9ed74e2

Please sign in to comment.