fixed failing searchControllerTests

This commit is contained in:
2026-07-01 18:16:11 +02:00
parent e310c1bbd8
commit fed981212a
2 changed files with 7 additions and 8 deletions
@@ -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