feeds.versions have a pattern
This commit is contained in:
@@ -15,7 +15,7 @@ func TestFeeds(t *testing.T) {
|
||||
t.Run("crud", func(t *testing.T) {
|
||||
ctx := db.Test(t, ctx)
|
||||
|
||||
id, err := feeds.Insert(ctx, "url", "cron")
|
||||
id, err := feeds.Insert(ctx, "url", "cron", "pattern")
|
||||
if err != nil {
|
||||
t.Fatal("cannot insert:", err)
|
||||
}
|
||||
@@ -48,6 +48,9 @@ func TestFeeds(t *testing.T) {
|
||||
if got.Version.Cron != "cron" {
|
||||
t.Error("no version.cron")
|
||||
}
|
||||
if got.Version.Pattern != "pattern" {
|
||||
t.Error("bad version.pattern")
|
||||
}
|
||||
|
||||
if !got.Execution.Executed.IsZero() {
|
||||
t.Error("execution.executed")
|
||||
|
||||
Reference in New Issue
Block a user