MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / assertMoveArm

Function assertMoveArm

internal/store/commitment_move_test.go:34–42  ·  view source on GitHub ↗
(t *testing.T, f *schedFixture, sc *models.ItemSchedule, want string)

Source from the content-addressed store, hash-verified

32}
33
34func assertMoveArm(t *testing.T, f *schedFixture, sc *models.ItemSchedule, want string) {
35 t.Helper()
36 if n := f.count(t, `SELECT COUNT(*) FROM item_reminders WHERE schedule_id=? AND fired_at IS NULL`, sc.ID); n != 1 {
37 t.Fatalf("armed reminders=%d, want 1", n)
38 }
39 if r := f.managed(t, f.reload(t, sc.ItemID)); r.RemindAt != want {
40 t.Fatalf("remind_at=%s, want %s", r.RemindAt, want)
41 }
42}
43
44func TestMoveTargetSavesImmediatelyNoReason(t *testing.T) {
45 for _, body := range []string{"nil", "", " "} {

Calls 5

HelperMethod · 0.80
FatalfMethod · 0.80
countMethod · 0.45
managedMethod · 0.45
reloadMethod · 0.45

Tested by

no test coverage detected