Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
feat: extend integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daho4b committed Dec 9, 2020
1 parent 072b7b7 commit 55f450d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

Expand Down Expand Up @@ -144,7 +145,8 @@ public void createAgency_Should_ReturnBadRequest_WhenAgencyConsultingType_IsInva
post(CREATE_AGENCY_PATH)
.content(new ObjectMapper().writeValueAsString(agencyDTO))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest());
.andExpect(status().isBadRequest())
.andExpect(header().string("X-Reason", "INVALID_CONSULTING_TYPE"));

}

Expand All @@ -160,7 +162,8 @@ public void createAgency_Should_ReturnBadRequest_WhenAgencyDiocese_IsInvalid()
post(CREATE_AGENCY_PATH)
.content(new ObjectMapper().writeValueAsString(agencyDTO))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest());
.andExpect(status().isBadRequest())
.andExpect(header().string("X-Reason", "INVALID_DIOCESE"));

}

Expand All @@ -176,7 +179,8 @@ public void createAgency_Should_ReturnBadRequest_WhenAgencyPostcode_IsInvalid()
post(CREATE_AGENCY_PATH)
.content(new ObjectMapper().writeValueAsString(agencyDTO))
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isBadRequest());
.andExpect(status().isBadRequest())
.andExpect(header().string("X-Reason", "INVALID_POSTCODE"));

}
}

0 comments on commit 55f450d

Please sign in to comment.