Skip to content

Commit

Permalink
Merge pull request #5285 from lpichler/use_ChargebackRateDetailCurren…
Browse files Browse the repository at this point in the history
…cy#code_as_reference_for_currency

Fix specs to use ChargebackRateDetailCurrency#code
  • Loading branch information
mzazrivec committed Feb 27, 2019
2 parents c520c2f + a38611b commit 84c7224
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/controllers/chargeback_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ def expect_chargeback_rate_to_eq_hash(expected_rate, rate_hash)
rate_detail_hash = rate_hash[:rates][index]

expect(rate_detail).to have_attributes(rate_detail_hash.slice(*ChargebackRateDetail::FORM_ATTRIBUTES))
expect(rate_detail.detail_currency.name).to eq(rate_detail_hash[:type_currency])
expect(rate_detail.detail_currency.code).to eq(rate_detail_hash[:type_currency])

rate_detail.chargeback_tiers.each_with_index do |tier, tier_index|
tier_hash = rate_detail_hash[:tiers][tier_index]
Expand Down Expand Up @@ -493,7 +493,7 @@ def convert_chargeback_rate_to_hash(rate)
end

rate_detail_hash[:measure] = rate_detail.chargeable_field.detail_measure.name
rate_detail_hash[:type_currency] = rate_detail.detail_currency.name
rate_detail_hash[:type_currency] = rate_detail.detail_currency.code
origin_chargeback_rate_hash[:rates].push(rate_detail_hash)
end
origin_chargeback_rate_hash
Expand Down

0 comments on commit 84c7224

Please sign in to comment.