Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APS-1655 - Removed unused Cas1SpaceSearchResult.spacesAvailable #2760

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()
}
}
Loading