Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary decimal conversion #3124

Merged
merged 2 commits into from
Mar 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/app/models/concerns/spree/user_reporting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def lifetime_value
end

def order_count
BigDecimal(spree_orders.complete.count)
spree_orders.complete.count
end

def average_order_value
Expand Down
2 changes: 1 addition & 1 deletion core/spec/models/spree/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def load_orders
describe "#order_count" do
before { load_orders }
it "returns the count of completed orders for the user" do
expect(subject.order_count).to eq BigDecimal(order_count)
expect(subject.order_count).to eq order_count
end
end

Expand Down