Skip to content

Commit

Permalink
AP-5437: Add state transition
Browse files Browse the repository at this point in the history
State transition added to allow moving back to parental
responsibiliity pages from check merits answers
  • Loading branch information
agoldstone93 committed Nov 12, 2024
1 parent c9ed615 commit f259b69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/concerns/non_means_tested_state_machine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/concerns/non_means_tested_state_machine_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f259b69

Please sign in to comment.