Skip to content

Commit

Permalink
fix: solve unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmanuelDemey committed Nov 29, 2024
1 parent b583fef commit eff8b87
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down Expand Up @@ -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());
}

Expand Down Expand Up @@ -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());
}

Expand Down

0 comments on commit eff8b87

Please sign in to comment.