fixed failing searchControllerTests
This commit is contained in:
@@ -63,7 +63,7 @@ public class HomeboxSearchProvider implements SearchProvider {
|
|||||||
String id = i.id();
|
String id = i.id();
|
||||||
String title = i.name();
|
String title = i.name();
|
||||||
String description = i.description();
|
String description = i.description();
|
||||||
Map<String, Object> extraSearchResponseData = Map.of("extraData", i.parent());
|
Map<String, Object> extraSearchResponseData = Map.of("parent", i.parent());
|
||||||
return new ServiceItem(id, title, description, extraSearchResponseData);
|
return new ServiceItem(id, title, description, extraSearchResponseData);
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
|
|||||||
@@ -93,8 +93,7 @@ class SearchControllerTest {
|
|||||||
.andExpect(status().isOk())
|
.andExpect(status().isOk())
|
||||||
.andExpect(jsonPath("$.content[0].title").value("MacBook Pro A1398"))
|
.andExpect(jsonPath("$.content[0].title").value("MacBook Pro A1398"))
|
||||||
.andExpect(jsonPath("$.totalElements").value(1))
|
.andExpect(jsonPath("$.totalElements").value(1))
|
||||||
.andExpect(jsonPath("$.content[0].extraData.location.name")
|
.andExpect(jsonPath("$.content[0].extraData.parent.name").value("Server Schrank Ikea weiß"));
|
||||||
.value("Server Schrank Ikea weiß"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user