Skip to content
Snippets Groups Projects
Commit 0724caef authored by Felix Reichenbach's avatar Felix Reichenbach
Browse files

OZG-6986 fix RootModelAssemblerTest

parent c9a1f2cd
No related branches found
No related tags found
1 merge request!5Ozg 6986 fix configurations link
......@@ -57,16 +57,17 @@ class RootModelAssemblerTest {
@DisplayName("Entity Model")
@Nested
class TestEntityModel {
private final List<Link> links = List.of(Link.of(RootController.PATH));
@BeforeEach
void beforeEach() {
when(restProperties.getBasePath()).thenReturn(BASE_PATH);
doReturn(links).when(modelAssembler).buildRootModelLinks();
}
@Test
void shouldHaveRoot() {
var givenRoot = RootTestFactory.create();
List<Link> links = List.of();
when(modelAssembler.buildRootModelLinks()).thenReturn(links);
var resultRoot = modelAssembler.toModel(givenRoot).getContent();
......@@ -75,9 +76,6 @@ class RootModelAssemblerTest {
@Test
void shouldHaveLinks() {
List<Link> links = List.of(Link.of(RootController.PATH));
when(modelAssembler.buildRootModelLinks()).thenReturn(links);
var modelLinks = modelAssembler.toModel(RootTestFactory.create()).getLinks();
assertThat(modelLinks).containsAll(links);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment