MCPcopy Index your code
hub / github.com/dnote/dnote / getExpectedNotePayload

Function getExpectedNotePayload

pkg/server/controllers/notes_test.go:35–51  ·  view source on GitHub ↗
(n database.Note, b database.Book, u database.User)

Source from the content-addressed store, hash-verified

33)
34
35func getExpectedNotePayload(n database.Note, b database.Book, u database.User) presenters.Note {
36 return presenters.Note{
37 UUID: n.UUID,
38 CreatedAt: truncateMicro(n.CreatedAt),
39 UpdatedAt: truncateMicro(n.UpdatedAt),
40 Body: n.Body,
41 AddedOn: n.AddedOn,
42 USN: n.USN,
43 Book: presenters.NoteBook{
44 UUID: b.UUID,
45 Label: b.Label,
46 },
47 User: presenters.NoteUser{
48 UUID: u.UUID,
49 },
50 }
51}
52
53func TestGetNotes(t *testing.T) {
54 db := testutils.InitMemoryDB(t)

Callers 2

TestGetNotesFunction · 0.85
TestGetNoteFunction · 0.85

Calls 1

truncateMicroFunction · 0.85

Tested by

no test coverage detected