Skip to content

Commit

Permalink
Merge pull request #1165 from DFE-Digital/space-seperate-policies
Browse files Browse the repository at this point in the history
Seperate policies in payment with a space
  • Loading branch information
pezholio authored Oct 7, 2020
2 parents f5cad17 + 1cfe1a7 commit 76c6dec
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog]
## [Unreleased]

- Update payment email copy
- Seperate policies in payment with a space

## [Release 084] - 2020-09-30

Expand Down
2 changes: 1 addition & 1 deletion app/models/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Payment < ApplicationRecord
delegate :scheduled_payment_date, to: :payroll_run

def policies_in_payment
claims.map { |claim| claim.policy.to_s }.uniq.sort.join(",")
claims.map { |claim| claim.policy.to_s }.uniq.sort.join(" ")
end

private
Expand Down
2 changes: 1 addition & 1 deletion spec/models/payment_confirmation_csv_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
let(:csv) do
<<~CSV
Payroll Reference,Gross Value,Payment ID,NI,Employers NI,Student Loans,Tax,Net Pay,Claim Policies
DFE00001,487.48,88b5dba7-ccf1-4ffd-a3ce-20bd3ce1e500,33.9,38.98,0,89.6,325,"MathsAndPhysics,StudentLoans"
DFE00001,487.48,88b5dba7-ccf1-4ffd-a3ce-20bd3ce1e500,33.9,38.98,0,89.6,325,"MathsAndPhysics StudentLoans"
CSV
end

Expand Down
2 changes: 1 addition & 1 deletion spec/models/payment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@
create(:claim, :approved, personal_details.merge(policy: MathsAndPhysics))
])

expect(payment.policies_in_payment).to eq("MathsAndPhysics,StudentLoans")
expect(payment.policies_in_payment).to eq("MathsAndPhysics StudentLoans")
end
end
end

0 comments on commit 76c6dec

Please sign in to comment.