Skip to content

Commit

Permalink
Order by group from ChargeableField, it was sorted by group with nil …
Browse files Browse the repository at this point in the history
…value
  • Loading branch information
lpichler committed Oct 30, 2017
1 parent 2560edc commit b74897b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/controllers/chargeback_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def expect_chargeback_rate_to_eq_hash(expected_rate, rate_hash)
post :cb_rate_edit, :params => {:button => "add"}

# change expected values from yaml
compute_chargeback_rate_hash_from_yaml[:rates].sort_by! { |rd| [rd[:group], rd[:description]] }
compute_chargeback_rate_hash_from_yaml[:rates].sort_by! { |rd| [ChargeableField.find_by(:metric => rd[:metric]).group, rd[:description]] }
compute_rates = compute_chargeback_rate_hash_from_yaml[:rates][index_to_rate_type.to_i]
compute_rates[:tiers][0][:finish] = 20.0
compute_rates[:tiers].push(:start => 20.0, :finish => 50.0)
Expand Down

0 comments on commit b74897b

Please sign in to comment.