MCPcopy
hub / github.com/dnote/dnote / TestViewNoteNotFound

Function TestViewNoteNotFound

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

Source from the content-addressed store, hash-verified

79}
80
81func TestViewNoteNotFound(t *testing.T) {
82 db := database.InitTestMemoryDB(t)
83 defer db.Close()
84
85 ctx := context.DnoteCtx{DB: db}
86 var buf bytes.Buffer
87
88 err := viewNote(ctx, &buf, "999", false)
89 assert.NotEqual(t, err, nil, "should return error for non-existent note")
90}

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