Project

General

Profile

Patch #44455 ยป fix-midnight-test-failure.patch

Go MAEDA, 2026-09-16 08:16

View differences:

test/test_helper.rb
self.use_transactional_tests = true
self.use_instantiated_fixtures = false
# Freeze the clock for the whole run so that fixtures (e.g. `1.minute.ago`)
# and tests share the same "now" even if the date changes mid-run.
FROZEN_TIME = Time.now
def before_setup
travel_to FROZEN_TIME
super
end
setup do
Redmine::SudoMode.stubs(:enabled?).returns(false)
end
    (1-1/1)