-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ACD-433: Add application summary to SearchProsecutionCase
- Updated `ApplicationSummary` and `ProsecutionCaseSummary` models to include the application summary data. - Modified `apiCourtsDefinitions.json` to reflect the new schema changes. - Added fixture file `application_summary/all_fields.json` for testing. - Created a new spec for `ApplicationSummary` model. - Updated `ProsecutionCaseSummary` spec to test integration with application summary data. - Enhanced `json_schema_rspec` to support validation of new schema changes. This commit introduces support for application summary in the prosecution case search functionality.
- Loading branch information
Showing
7 changed files
with
103 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"applicationId": "62158b87-56fc-43cc-bbdc-d957d372420f", | ||
"applicationReference": "CJ03512", | ||
"applicationType": "Application to amend a community order on change of residence", | ||
"applicationStatus": "EJECTED", | ||
"applicationExternalCreatorType": "PROSECUTOR", | ||
"receivedDate": "2024-12-21", | ||
"decisionDate": "2025-02-11", | ||
"dueDate": "2025-01-27" | ||
} |
31 changes: 31 additions & 0 deletions
31
spec/models/hmcts_common_platform/application_summary_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# { | ||
# "applicationId": "62158b87-56fc-43cc-bbdc-d957d372420f", | ||
# "applicationReference": "CJ03512", | ||
# "applicationType": "Application to amend a community order on change of residence", | ||
# "applicationStatus": "EJECTED", | ||
# "applicationExternalCreatorType": "PROSECUTOR", | ||
# "receivedDate": "2024-12-21", | ||
# "decisionDate": "2025-02-11", | ||
# "dueDate": "2025-01-27" | ||
# } | ||
|
||
RSpec.describe HmctsCommonPlatform::ApplicationSummary, type: :model do | ||
let(:hearing_summary) { described_class.new(data) } | ||
|
||
context "with all fields" do | ||
let(:data) { JSON.parse(file_fixture("application_summary/all_fields.json").read) } | ||
|
||
it "matches the HMCTS Common Platform schema" do | ||
expect(data).to match_json_schema(:application_summary) | ||
end | ||
|
||
it { expect(hearing_summary.id).to eql("62158b87-56fc-43cc-bbdc-d957d372420f") } | ||
it { expect(hearing_summary.reference).to eql("CJ03512") } | ||
it { expect(hearing_summary.type).to eql("Application to amend a community order on change of residence") } | ||
it { expect(hearing_summary.application_status).to eql("EJECTED") } | ||
it { expect(hearing_summary.application_external_creator_type).to eql("PROSECUTOR") } | ||
it { expect(hearing_summary.received_date).to eql("2024-12-21") } | ||
it { expect(hearing_summary.decision_date).to eql("2025-02-11") } | ||
it { expect(hearing_summary.due_date).to eql("2025-01-27") } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters