Commit c15634b1 authored by Matija Obreza's avatar Matija Obreza

Fix build: Updated unit tests

parent a6c81ebb
......@@ -134,6 +134,7 @@ public class ApiCropsTest extends AbstractRestTest {
fieldWithPath("createdBy").ignored(),
fieldWithPath("active").type(JsonFieldType.BOOLEAN).description("Record is active"),
fieldWithPath("_class").ignored(),
fieldWithPath("_permissions").ignored(),
fieldWithPath("createdDate").ignored(),
fieldWithPath("lastModifiedBy").ignored(),
fieldWithPath("lastModifiedDate").ignored())));
......@@ -158,6 +159,7 @@ public class ApiCropsTest extends AbstractRestTest {
fieldWithPath("rdfUri").type(JsonFieldType.STRING).optional().description("URI of RDF term describing the crop"),
fieldWithPath("i18n").type(JsonFieldType.STRING).optional().description("i18n map"), fieldWithPath("createdBy").ignored(),
fieldWithPath("_class").ignored(),
fieldWithPath("_permissions").ignored(),
fieldWithPath("createdDate").ignored(),
fieldWithPath("lastModifiedBy").ignored(),
fieldWithPath("lastModifiedDate").ignored())));
......@@ -180,7 +182,23 @@ public class ApiCropsTest extends AbstractRestTest {
.andExpect(jsonPath("$.active", is(true)))
.andExpect(jsonPath("$.name", is("Rice")))
.andExpect(jsonPath("$.description", is("Crop description in EN")))
.andDo(document("crop-delete", pathParameters(parameterWithName("shortName").description("Crop short name or code (e.g. maize)"))));
.andDo(document("crop-delete",
pathParameters(parameterWithName("shortName").description("Crop short name or code (e.g. maize)")),
responseFields(
fieldWithPath("id").description("Autogenerated ID"),
fieldWithPath("version").description("Record version"),
fieldWithPath("name").description("Crop name in English"),
fieldWithPath("shortName").description("Crop short name or code (e.g. maize)"),
fieldWithPath("description").description("Crop description in English"),
fieldWithPath("active").optional().description("Record is active"),
fieldWithPath("otherNames").type(JsonFieldType.ARRAY).optional().description("Alternative spellings of the crop name"),
fieldWithPath("rdfUri").type(JsonFieldType.STRING).optional().description("URI of RDF term describing the crop"),
fieldWithPath("i18n").type(JsonFieldType.STRING).optional().description("i18n map"), fieldWithPath("createdBy").ignored(),
fieldWithPath("_class").ignored(),
fieldWithPath("_permissions").ignored(),
fieldWithPath("createdDate").ignored(),
fieldWithPath("lastModifiedBy").ignored(),
fieldWithPath("lastModifiedDate").ignored())));
LOG.info("Test deleteCropTest passed");
}
......
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