Skip to content

Commit

Permalink
Update GeoJsonControllerIntegrationTest to reflect new plan limits co…
Browse files Browse the repository at this point in the history
…ntroller, and remove redundant test
  • Loading branch information
vimto committed Sep 13, 2023
1 parent 9289869 commit da6ffb0
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 40 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package nz.govt.eop.geo
package nz.govt.eop.plan_limits

import org.junit.jupiter.api.Test
import org.springframework.beans.factory.annotation.Autowired
Expand All @@ -13,55 +13,59 @@ import org.springframework.test.web.servlet.result.MockMvcResultMatchers.*
@ActiveProfiles("test")
@SpringBootTest
@AutoConfigureMockMvc
class GeoJsonControllerIntegrationTest(@Autowired val mvc: MockMvc) {
class ControllerIntegrationTest(@Autowired val mvc: MockMvc) {

@Test
fun `can load manifest`() {
mvc.perform(get("/manifest").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk)
fun `can load councils`() {
mvc.perform(get("/plan-limits/councils").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load councils`() {
mvc.perform(get("/layers/councils").contentType(MediaType.APPLICATION_JSON))
fun `can load manifest`() {
mvc.perform(get("/plan-limits/manifest?councilId=9").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load whaitua`() {
mvc.perform(get("/layers/whaitua").contentType(MediaType.APPLICATION_JSON))
fun `can load plan`() {
mvc.perform(get("/plan-limits/plan?councilId=9").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load surface water management units`() {
fun `can load plann regions`() {
mvc.perform(
get("/layers/surface-water-management-units").contentType(MediaType.APPLICATION_JSON))
get("/plan-limits/plan-regions?councilId=9").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load surface water management sub units`() {
fun `can load surface water limits`() {
mvc.perform(
get("/layers/surface-water-management-sub-units")
get("/plan-limits/surface-water-limits?councilId=9")
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load flow management sites`() {
mvc.perform(get("/layers/flow-management-sites").contentType(MediaType.APPLICATION_JSON))
fun `can load ground water limits`() {
mvc.perform(
get("/plan-limits/ground-water-limits?councilId=9")
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load flow limits`() {
mvc.perform(get("/layers/flow-limits").contentType(MediaType.APPLICATION_JSON))
fun `can load flow management sites`() {
mvc.perform(
get("/plan-limits/flow-measurement-sites?councilId=9")
.contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}

@Test
fun `can load groundwater zones`() {
mvc.perform(get("/layers/groundwater-zones").contentType(MediaType.APPLICATION_JSON))
fun `can load flow limits`() {
mvc.perform(get("/plan-limits/flow-limits?councilId=9").contentType(MediaType.APPLICATION_JSON))
.andExpect(status().isOk)
}
}

0 comments on commit da6ffb0

Please sign in to comment.