From a4f3252d9e24f42be0538878104e78f1463dbb7d Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Sat, 16 Dec 2023 17:47:09 +0100 Subject: [PATCH] fix: fix tests #38 --- schedule-interval_test.go | 4 ++-- scheduler_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/schedule-interval_test.go b/schedule-interval_test.go index ecde52f..ad72822 100644 --- a/schedule-interval_test.go +++ b/schedule-interval_test.go @@ -28,7 +28,7 @@ interval: "1h30m" assert.Equal(t, expectedTime, *sp.Time, "the time should be parsed correctly") expectedInterval, _ := time.ParseDuration("1h30m") - assert.Equal(t, expectedInterval, sp.Delay, "the interval should be parsed correctly") + assert.Equal(t, expectedInterval, sp.Interval, "the interval should be parsed correctly") } // TestUnmarshalJSON tests the UnmarshalJSON method @@ -56,5 +56,5 @@ func TestUnmarshalJSON(t *testing.T) { // Verify that the Delay field is correctly parsed expectedInterval, _ := time.ParseDuration("1h30m") - assert.Equal(t, expectedInterval, sp.Delay, "Interval should be correctly parsed") + assert.Equal(t, expectedInterval, sp.Interval, "Interval should be correctly parsed") } diff --git a/scheduler_test.go b/scheduler_test.go index 7fc0d4a..682292d 100644 --- a/scheduler_test.go +++ b/scheduler_test.go @@ -430,6 +430,6 @@ time: "2023-12-15T12:00:00Z" // Prüfen, ob die Werte korrekt unmarshalled wurden assert.Equal(t, "interval", sp.Type, "Type should be unmarshalled correctly") - assert.Equal(t, expectedInterval, sp.Delay, "Interval should be unmarshalled correctly") + assert.Equal(t, expectedInterval, sp.Interval, "Interval should be unmarshalled correctly") assert.Equal(t, &expectedTime, sp.Time, "Time should be unmarshalled correctly") } -- GitLab