Skip to content

Commit

Permalink
fix timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
ezekg committed Mar 9, 2024
1 parent fbd6c45 commit 09cd449
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/lib/union_of_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
end

it 'should produce a join with association scopes' do
with_time Time.parse('2024-03-08 16:15:16') do |t|
with_time Time.parse('2024-03-08 01:23:45 UTC') do |t|
expect(model.joins(:any_active_licenses).to_sql).to match_sql <<~SQL.squish
SELECT
"users".*
Expand All @@ -247,18 +247,18 @@
"licenses"
WHERE
(
licenses.created_at >= '2023-12-09 22:15:16'
licenses.created_at >= '2023-12-09 01:23:45'
OR (
licenses.last_validated_at IS NOT NULL
AND licenses.last_validated_at >= '2023-12-09 22:15:16'
AND licenses.last_validated_at >= '2023-12-09 01:23:45'
)
OR (
licenses.last_check_out_at IS NOT NULL
AND licenses.last_check_out_at >= '2023-12-09 22:15:16'
AND licenses.last_check_out_at >= '2023-12-09 01:23:45'
)
OR (
licenses.last_check_in_at IS NOT NULL
AND licenses.last_check_in_at >= '2023-12-09 22:15:16'
AND licenses.last_check_in_at >= '2023-12-09 01:23:45'
)
)
)
Expand All @@ -272,18 +272,18 @@
INNER JOIN "licenses" ON "licenses"."id" = "license_users"."license_id"
WHERE
(
licenses.created_at >= '2023-12-09 22:15:16'
licenses.created_at >= '2023-12-09 01:23:45'
OR (
licenses.last_validated_at IS NOT NULL
AND licenses.last_validated_at >= '2023-12-09 22:15:16'
AND licenses.last_validated_at >= '2023-12-09 01:23:45'
)
OR (
licenses.last_check_out_at IS NOT NULL
AND licenses.last_check_out_at >= '2023-12-09 22:15:16'
AND licenses.last_check_out_at >= '2023-12-09 01:23:45'
)
OR (
licenses.last_check_in_at IS NOT NULL
AND licenses.last_check_in_at >= '2023-12-09 22:15:16'
AND licenses.last_check_in_at >= '2023-12-09 01:23:45'
)
)
)
Expand Down

0 comments on commit 09cd449

Please sign in to comment.