From f259b69ea79a3fc8aa314bb167cf54542c5b53ee Mon Sep 17 00:00:00 2001 From: Adam Goldstone <13471320+agoldstone93@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:30:28 +0000 Subject: [PATCH] AP-5437: Add state transition State transition added to allow moving back to parental responsibiliity pages from check merits answers --- app/models/concerns/non_means_tested_state_machine.rb | 1 + spec/concerns/non_means_tested_state_machine_spec.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/concerns/non_means_tested_state_machine.rb b/app/models/concerns/non_means_tested_state_machine.rb index f4c9d01699..7f166dde25 100644 --- a/app/models/concerns/non_means_tested_state_machine.rb +++ b/app/models/concerns/non_means_tested_state_machine.rb @@ -11,6 +11,7 @@ def case_add_requestor transitions from: :provider_entering_merits, to: :merits_parental_responsibilities transitions from: :merits_parental_responsibilities, to: :merits_parental_responsibilities transitions from: :merits_parental_responsibilities_all_rejected, to: :merits_parental_responsibilities_all_rejected + transitions from: :checking_merits_answers, to: :merits_parental_responsibilities end event :rejected_all_parental_responsibilities do diff --git a/spec/concerns/non_means_tested_state_machine_spec.rb b/spec/concerns/non_means_tested_state_machine_spec.rb index fa9bdcbcd6..59095013bc 100644 --- a/spec/concerns/non_means_tested_state_machine_spec.rb +++ b/spec/concerns/non_means_tested_state_machine_spec.rb @@ -19,6 +19,7 @@ it { is_expected.to transition_from(:provider_entering_merits).to(:merits_parental_responsibilities).on_event(event) } it { is_expected.to transition_from(:merits_parental_responsibilities).to(:merits_parental_responsibilities).on_event(event) } it { is_expected.to transition_from(:merits_parental_responsibilities_all_rejected).to(:merits_parental_responsibilities_all_rejected).on_event(event) } + it { is_expected.to transition_from(:checking_merits_answers).to(:merits_parental_responsibilities).on_event(event) } end describe "#rejected_all_parental_responsibilities" do