fixed failing searchControllerTests
This commit is contained in:
@@ -63,7 +63,7 @@ public class HomeboxSearchProvider implements SearchProvider {
|
||||
String id = i.id();
|
||||
String title = i.name();
|
||||
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);
|
||||
}).toList();
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ class SearchControllerTest {
|
||||
"description": "Weißer Ikea Schrank, wo sich der Server befindet.",
|
||||
"createdAt": "2026-05-13T19:55:55.817576Z",
|
||||
"updatedAt": "2026-05-14T12:37:24.396651Z"
|
||||
},
|
||||
"tags": [],
|
||||
"imageId": "cb3e44d5-ccd4-421e-9f5a-f52cd5f40ca6",
|
||||
"thumbnailId": "2bfd53fa-1bf1-483c-8d76-7720464532fa",
|
||||
"soldTime": "0001-01-01T00:00:00Z"
|
||||
},
|
||||
"tags": [],
|
||||
"imageId": "cb3e44d5-ccd4-421e-9f5a-f52cd5f40ca6",
|
||||
"thumbnailId": "2bfd53fa-1bf1-483c-8d76-7720464532fa",
|
||||
"soldTime": "0001-01-01T00:00:00Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -93,8 +93,7 @@ class SearchControllerTest {
|
||||
.andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.content[0].title").value("MacBook Pro A1398"))
|
||||
.andExpect(jsonPath("$.totalElements").value(1))
|
||||
.andExpect(jsonPath("$.content[0].extraData.location.name")
|
||||
.value("Server Schrank Ikea weiß"));
|
||||
.andExpect(jsonPath("$.content[0].extraData.parent.name").value("Server Schrank Ikea weiß"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user