Project

General

Profile

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

Go MAEDA, 2026-09-16 08:16

View differences:

test/test_helper.rb
60 60
  self.use_transactional_tests = true
61 61
  self.use_instantiated_fixtures  = false
62 62

  
63
  # Freeze the clock for the whole run so that fixtures (e.g. `1.minute.ago`)
64
  # and tests share the same "now" even if the date changes mid-run.
65
  FROZEN_TIME = Time.now
66

  
67
  def before_setup
68
    travel_to FROZEN_TIME
69
    super
70
  end
71

  
63 72
  setup do
64 73
    Redmine::SudoMode.stubs(:enabled?).returns(false)
65 74
  end
    (1-1/1)