Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sinetheta committed Feb 18, 2018
1 parent 10f5e80 commit 5e2b124
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/app/models/spree/distributed_amounts_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ def initialize(line_item, promotion, total_amount)
@total_amount = total_amount
end

# @return [Float] the weighted adjustment for the initialized line item
# @return [BigDecimal] the weighted adjustment for the initialized line item
def amount
distributed_amounts[@line_item.id].to_f
distributed_amounts[@line_item.id].to_d
end

private
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
context "when the order currency matches the store's currency" do
let(:currency) { "USD" }
it { is_expected.to eq 5 }
it { is_expected.to be_a BigDecimal }
end

context "when the order currency does not match the store's currency" do
Expand Down

0 comments on commit 5e2b124

Please sign in to comment.