From eff8b87e4fd8e3d55722cfe3ce21f1ce61090706 Mon Sep 17 00:00:00 2001 From: Emmanuel Date: Fri, 29 Nov 2024 19:43:15 +0000 Subject: [PATCH] fix: solve unit test --- .../authorizations/TestStructuresResourcesEnvProd.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/java/fr/insee/rmes/integration/authorizations/TestStructuresResourcesEnvProd.java b/src/test/java/fr/insee/rmes/integration/authorizations/TestStructuresResourcesEnvProd.java index 71addcbf1..5ba8f63d4 100644 --- a/src/test/java/fr/insee/rmes/integration/authorizations/TestStructuresResourcesEnvProd.java +++ b/src/test/java/fr/insee/rmes/integration/authorizations/TestStructuresResourcesEnvProd.java @@ -167,7 +167,7 @@ void postStructureAsStructureContributorWrongStamp_ko() throws Exception { mvc.perform(post("/structures/structure").header("Authorization", "Bearer toto") .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) - .content("{\"id\": \"1\",\"contributor\": \"wrong\"}")) + .content("{\"id\": \"1\",\"contributor\": [\"wrong\"]}")) .andExpect(status().isForbidden()); } @@ -227,7 +227,7 @@ void postComponentAsStructureContributor_ok() throws Exception { mvc.perform(post("/structures/components").header("Authorization", "Bearer toto") .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) - .content("{\"id\": \"1\",\"contributor\": \""+timbre+"\"}")) + .content("{\"id\": \"1\",\"contributor\": [\""+timbre+"\"]}")) .andExpect(status().isCreated()); } @@ -256,7 +256,7 @@ void postComponentAsStructureContributorWrongStamp_ko() throws Exception { mvc.perform(post("/structures/components").header("Authorization", "Bearer toto") .contentType(MediaType.APPLICATION_JSON) .accept(MediaType.APPLICATION_JSON) - .content("{\"id\": \"1\",\"contributor\": \"wrong\"}")) + .content("{\"id\": \"1\",\"contributor\": [\"wrong\"]}")) .andExpect(status().isForbidden()); }