0678d19097
- The db test will run an sqlite3 database in in-memory mode and run the automigrations. - The template test will check if all the templates that are stored in package variables (template.Must) compile and if ReloadTemplates works without panicking.
16 lignes
232 o
Go
16 lignes
232 o
Go
package router
|
|
|
|
import (
|
|
"path"
|
|
"testing"
|
|
)
|
|
|
|
// run before router/init.go:init()
|
|
var _ = func() (_ struct{}) {
|
|
TemplateDir = path.Join("..", TemplateDir)
|
|
return
|
|
}()
|
|
|
|
func TestReloadTemplates(t *testing.T) {
|
|
ReloadTemplates()
|
|
}
|