Base project to template

This commit is contained in:
bel
2020-03-12 13:48:04 -06:00
commit f022b26987
19 changed files with 543 additions and 0 deletions

26
server/.notes/dir_test.go Executable file
View File

@@ -0,0 +1,26 @@
package notes
import (
"net/http/httptest"
"testing"
)
func TestLsDir(t *testing.T) {
p := Path{Local: "/usr/local"}
dirs, files := lsDir(p)
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) {
path := Path{Local: "/usr/local"}
w := httptest.NewRecorder()
notesDir(path, w, nil)
t.Logf("%s", w.Body.Bytes())
}