Skip to content

Commit

Permalink
Merge pull request #555 from jsantos/bugfix/timezone_flaky_test
Browse files Browse the repository at this point in the history
Fix flaky test which would fail in certain timezones
  • Loading branch information
danielmorrison authored Jan 8, 2021
2 parents 2e8f1ac + 423ae5a commit c5fb28a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/audited/audit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class TempModel < ::ActiveRecord::Base
it "uses created at" do
Audited::Audit.delete_all
audit = Models::ActiveRecord::User.create(name: "John").audits.last
audit.update_columns(created_at: Time.parse('2018-01-01'))
audit.update_columns(created_at: Time.zone.parse('2018-01-01'))
expect(Audited::Audit.collection_cache_key).to match(/-20180101\d+$/)
end
else
Expand Down

0 comments on commit c5fb28a

Please sign in to comment.