package notes import ( "gitea.inhome.blapointe.com/local/notes-server/config" "testing" ) func TestDir(t *testing.T) { n := &Notes{} config.Root = "/" dirs, files, err := n.Dir("/notes/usr/local") if err != nil { t.Fatal(err) } if len(dirs) == 0 { t.Fatal(len(dirs)) } if len(files) == 0 { t.Fatal(len(files)) } t.Log(dirs) t.Log(files) } func TestNotesDir(t *testing.T) { n := &Notes{} body, body2, err := n.Dir("/notes/usr/local") if err != nil { t.Fatal(err) } if body == "" || body2 == "" { t.Fatal(body, body2) } t.Logf("%s", body) t.Logf("%s", body2) }