e116b30b40
After some thoughts, it is better to use the config from config files than default ones
21 lignes
412 o
Go
21 lignes
412 o
Go
package router
|
|
|
|
import (
|
|
"path"
|
|
"testing"
|
|
|
|
"github.com/NyaaPantsu/nyaa/config"
|
|
)
|
|
|
|
// run before router/init.go:init()
|
|
var _ = func() (_ struct{}) {
|
|
TemplateDir = path.Join("..", TemplateDir)
|
|
config.ConfigPath = path.Join("..", config.ConfigPath)
|
|
config.DefaultConfigPath = path.Join("..", config.DefaultConfigPath)
|
|
config.Parse()
|
|
return
|
|
}()
|
|
|
|
func TestReloadTemplates(t *testing.T) {
|
|
ReloadTemplates()
|
|
}
|