Skip to content

Commit

Permalink
Removed Cas1SpaceSearchResult.spacesAvailable
Browse files Browse the repository at this point in the history
This was always populated as an empty list, and not used on the UI
  • Loading branch information
davidatkinsuk committed Jan 3, 2025
1 parent d4bc81a commit 406649d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class Cas1SpaceSearchResultsTransformer {
},
),
distanceInMiles = candidatePremises.distanceInMiles.toBigDecimal(),
spacesAvailable = listOf(),
)
},
)
Expand Down
20 changes: 3 additions & 17 deletions src/main/resources/static/cas1-schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,23 +318,9 @@ components:
distanceInMiles:
type: number
example: 2.1
spacesAvailable:
type: array
deprecated: true
description: "This is not populated and will be removed in the future"
items:
$ref: '#/components/schemas/Cas1SpaceAvailability'
Cas1SpaceAvailability:
type: object
deprecated: true
properties:
spaceCharacteristics:
type: array
items:
$ref: '#/components/schemas/Cas1SpaceCharacteristic'
durationInDays:
type: integer
example: 77
required:
- premises
- distanceInMiles
Cas1SpaceCategory:
type: string
example: arson
Expand Down
20 changes: 3 additions & 17 deletions src/main/resources/static/codegen/built-cas1-api-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6365,23 +6365,9 @@ components:
distanceInMiles:
type: number
example: 2.1
spacesAvailable:
type: array
deprecated: true
description: "This is not populated and will be removed in the future"
items:
$ref: '#/components/schemas/Cas1SpaceAvailability'
Cas1SpaceAvailability:
type: object
deprecated: true
properties:
spaceCharacteristics:
type: array
items:
$ref: '#/components/schemas/Cas1SpaceCharacteristic'
durationInDays:
type: integer
example: 77
required:
- premises
- distanceInMiles
Cas1SpaceCategory:
type: string
example: arson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,10 +364,9 @@ class Cas1SpaceSearchTest : InitialiseDatabasePerClassTestBase() {
expectedApType: ApType = ApType.normal,
expectedCharacteristics: List<Cas1SpaceCharacteristic>? = null,
) {
assertThat(actual.spacesAvailable).isEmpty()
assertThat(actual.distanceInMiles).isGreaterThan(0f.toBigDecimal())
assertThat(actual.premises).isNotNull
val premises = actual.premises!!
val premises = actual.premises
assertThat(premises.id).isEqualTo(expected.id)
assertThat(premises.apType).isEqualTo(expectedApType)
assertThat(premises.name).isEqualTo(expected.name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class Cas1SpaceSearchResultsTransformerTest {
assertThat(premises1.premisesCharacteristics).isEmpty()
assertThat(premises1.characteristics).isEmpty()
assertThat(actual.results[0].distanceInMiles).isEqualTo(BigDecimal.valueOf(1.0))
assertThat(actual.results[0].spacesAvailable).isEmpty()

val premises2 = actual.results[1].premises
assertThat(premises2).isNotNull
Expand All @@ -107,6 +106,5 @@ class Cas1SpaceSearchResultsTransformerTest {
assertThat(premises2.premisesCharacteristics).isEmpty()
assertThat(premises2.characteristics).isEmpty()
assertThat(actual.results[1].distanceInMiles).isEqualTo(BigDecimal.valueOf(2.0))
assertThat(actual.results[1].spacesAvailable).isEmpty()
}
}

0 comments on commit 406649d

Please sign in to comment.