feeds.Executed
This commit is contained in:
@@ -82,5 +82,27 @@ func TestFeeds(t *testing.T) {
|
||||
if !got.Execution.Version.IsZero() {
|
||||
t.Error("execution.version")
|
||||
}
|
||||
|
||||
if err := f.Executed(ctx, got.Entry.ID, got.Version.Created); err != nil {
|
||||
t.Fatal("cannot executed:", err)
|
||||
}
|
||||
|
||||
got2, err := f.Get(ctx, id)
|
||||
if err != nil {
|
||||
t.Fatal("cannot get w executed:", err)
|
||||
}
|
||||
t.Logf("%+v", got2)
|
||||
|
||||
if got2.Execution.Executed.IsZero() {
|
||||
t.Error("no execution.executed")
|
||||
}
|
||||
if got2.Execution.Version != got.Version.Created {
|
||||
t.Errorf("bad execution.version: expected %v but got %v (difference of %v)", got.Version.Created, got2.Execution.Version, got2.Execution.Version.Sub(got.Execution.Version))
|
||||
}
|
||||
|
||||
got2.Execution = got.Execution
|
||||
if got != got2 {
|
||||
t.Errorf("changes after execution: was \n\t%+v but now \n\t%+v", got, got2)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user