MCPcopy
hub / github.com/dnote/dnote / TestViewNoteInvalidRowID

Function TestViewNoteInvalidRowID

pkg/cli/cmd/view/note_test.go:70–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

68}
69
70func TestViewNoteInvalidRowID(t *testing.T) {
71 db := database.InitTestMemoryDB(t)
72 defer db.Close()
73
74 ctx := context.DnoteCtx{DB: db}
75 var buf bytes.Buffer
76
77 err := viewNote(ctx, &buf, "not-a-number", false)
78 assert.NotEqual(t, err, nil, "should return error for invalid rowid")
79}
80
81func TestViewNoteNotFound(t *testing.T) {
82 db := database.InitTestMemoryDB(t)

Callers

nothing calls this directly

Calls 4

InitTestMemoryDBFunction · 0.92
NotEqualFunction · 0.92
viewNoteFunction · 0.85
CloseMethod · 0.65

Tested by

no test coverage detected