Fix example compilation error (#50)

This commit is contained in:
Kevin Lee
2023-02-03 22:36:21 +08:00
committed by GitHub
parent cc6ec2b886
commit 15370a9acd
3 changed files with 28 additions and 11 deletions

View File

@@ -16,7 +16,7 @@ func TestFilterUnmarshal(t *testing.T) {
t.Errorf("failed to parse filter json: %v", err)
}
if f.Since == nil || f.Since.Format("2006-01-02") != "2022-02-07" ||
if f.Since == nil || f.Since.UTC().Format("2006-01-02") != "2022-02-07" ||
f.Until != nil ||
f.Tags == nil || len(f.Tags) != 2 || !slices.Contains(f.Tags["something"], "bab") {
t.Error("failed to parse filter correctly")