Skip to content

Commit

Permalink
AP-4327: Extend partner flow following outgoings
Browse files Browse the repository at this point in the history
There was a missing flow step when an applicant has a partner
but has no outgoings
  • Loading branch information
colinbruce committed Jan 17, 2024
1 parent 8f1b0f0 commit fdc1048
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/services/flow/flows/provider_income.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ class ProviderIncome < FlowSteps
:cash_outgoings
elsif application.income_types? && !application.uploading_bank_statements?
:income_summary
elsif application.applicant.has_partner_with_no_contrary_interest?
:partner_about_financial_means
else
:has_dependants
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,20 @@
request
expect(response).to redirect_to(providers_legal_aid_application_means_has_dependants_path(legal_aid_application))
end

context "and there is a partner" do
let(:legal_aid_application) do
create(:legal_aid_application,
:with_applicant_and_partner,
:with_non_passported_state_machine,
no_debit_transaction_types_selected: true)
end

it "redirects to the about partner financial means page" do
request
expect(response).to redirect_to(providers_legal_aid_application_partners_about_financial_means_path(legal_aid_application))
end
end
end

context "with bank statement upload flow" do
Expand Down

0 comments on commit fdc1048

Please sign in to comment.