Skip to content

Commit

Permalink
Fix spec
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldrk committed Oct 24, 2024
1 parent 677f07d commit d8deb6c
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,14 @@ def get_data
expect(calculator_data['spouseFullName']['last']).to eq('')
end

# it 'returns empty string for creditorName' do
# pre_form_data['installment_contracts_and_other_debts']['creditor_name'] = nil
# calculator = described_class.new(pre_form_data)
# calculator_data = calculator.get_data
#
# expect(calculator_data['installmentContractsAndOtherDebts']['creditorName']).to eq('')
# end
it 'returns empty string for creditorName' do
pre_form_data['installment_contracts'].first['creditor_name'] = nil
calculator = described_class.new(pre_form_data)
calculator_data = calculator.get_data

creditor_names = calculator_data.map { |calc_datum| calc_datum['creditorName'] }

Check failure on line 55 in modules/debts_api/spec/lib/debt_api/v0/fsr_form_transform/installment_contracts_other_debts_calculator_spec.rb

View workflow job for this annotation

GitHub Actions / Linting and Security

Rails/Pluck: Prefer `pluck('creditorName')` over `map { |calc_datum| calc_datum['creditorName'] }`.
expect(creditor_names).to eq(['', ''])
end
end
end
end

0 comments on commit d8deb6c

Please sign in to comment.