MCPcopy
hub / github.com/dnote/dnote / Setup4

Function Setup4

pkg/cli/testutils/setup.go:58–65  ·  view source on GitHub ↗

Setup4 sets up a dnote env #4

(t *testing.T, db *database.DB)

Source from the content-addressed store, hash-verified

56
57// Setup4 sets up a dnote env #4
58func Setup4(t *testing.T, db *database.DB) {
59 b1UUID := "js-book-uuid"
60
61 database.MustExec(t, "setting up book 1", db, "INSERT INTO books (uuid, label, usn) VALUES (?, ?, ?)", b1UUID, "js", 111)
62
63 database.MustExec(t, "setting up note 1", db, "INSERT INTO notes (rowid, uuid, book_uuid, body, added_on, usn) VALUES (?, ?, ?, ?, ?, ?)", 1, "43827b9a-c2b0-4c06-a290-97991c896653", b1UUID, "Booleans have toString()", 1515199943, 11)
64 database.MustExec(t, "setting up note 2", db, "INSERT INTO notes (rowid, uuid, book_uuid, body, added_on, usn) VALUES (?, ?, ?, ?, ?, ?)", 2, "f0d0fbb7-31ff-45ae-9f0f-4e429c0c797f", b1UUID, "Date object implements mathematical comparisons", 1515199951, 12)
65}
66
67// Setup5 sets up a dnote env #2
68func Setup5(t *testing.T, db *database.DB) {

Callers 2

TestEditNoteFunction · 0.92
TestViewFunction · 0.92

Calls 1

MustExecFunction · 0.92

Tested by 2

TestEditNoteFunction · 0.74
TestViewFunction · 0.74