Commit 697e6f1a authored by Jean-Baptiste Nizet's avatar Jean-Baptiste Nizet
Browse files

feat: support legacy path for germplasm card

parent d35cead5
......@@ -39,10 +39,13 @@ import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBo
* Controller used to display a germplasm card based on its ID.
* Note that this controller is mapped to the /germplasm path in addition to
* the canonical /germplasms path in order to still honor legacy URLs used
* in external applications
* @author JB Nizet
@RequestMapping({"/germplasms", "/germplasm"})
public class GermplasmController {
private final GermplasmRepository germplasmRepository;
......@@ -160,6 +160,18 @@ public class GermplasmControllerTest {
void shouldSupportLegacyPath() throws Exception {
PaginatedList<GermplasmVO> puiList = new PaginatedList<>(null, Collections.singletonList(germplasm));
mockMvc.perform(get("/germplasm").param("pui", germplasm.getGermplasmPUI()))
.andExpect(htmlContent().hasTitle("Germplasm: BLE BARBU DU ROUSSILLON"))
void shouldGenerateSitemap() throws Exception {
List<GermplasmSitemapVO> germplasms = Arrays.asList(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment