This commit is contained in:
Radu Ioan Fericean
2014-10-07 11:45:41 +03:00
parent c0b4a13257
commit 4092490a3d

View File

@@ -268,7 +268,7 @@ func TestActionTimingHourYears(t *testing.T) {
func TestActionTimingHourMonthdaysYear(t *testing.T) {
y, m, d := now.Date()
testTime := time.Date(y, 1, d, 10, 1, 0, 0, time.Local)
testTime := time.Date(y, m, d, 10, 1, 0, 0, time.Local)
tomorrow := time.Date(y, m, d, 10, 1, 0, 0, time.Local).AddDate(0, 0, 1)
nextYear := time.Date(y, 1, d, 10, 1, 0, 0, time.Local).AddDate(1, 0, 0)
expected := testTime
@@ -287,7 +287,7 @@ func TestActionTimingHourMonthdaysYear(t *testing.T) {
},
}}
t.Log(at.Timing.Timing.CronString())
t.Log(time.Now(), referenceDate, referenceDate.After(testTime))
t.Log(time.Now(), referenceDate, referenceDate.After(testTime), referenceDate.After(testTime))
st := at.GetNextStartTime(referenceDate)
if !st.Equal(expected) {
t.Errorf("Expected %v was %v", expected, st)