Skip to content

Commit

Permalink
chore: compare decimals so the test works with mysql
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdaniel committed May 28, 2024
1 parent a80252f commit bc4573a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion integration_test/sql/subquery.exs
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ defmodule Ecto.Integration.SubQueryTest do

query = from p in Post, as: :p, select: sum(p.visits), group_by: exists(from p in Post, where: p.visits > parent_as(:p).visits), order_by: [sum(p.visits)]

assert [11, 20] = TestRepo.all(query)
assert [Decimal.new(11), Decimal.new(20)] = Enum.map(TestRepo.all(query), &Decimal.new/1)
end
end

0 comments on commit bc4573a

Please sign in to comment.