Use consts for route names and templates.
This commit is contained in:
parent
a787d5dc7f
commit
60c8aefd49
30 changed files with 135 additions and 82 deletions
|
|
@ -1,17 +1,18 @@
|
|||
package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGet(t *testing.T) {
|
||||
_, err := Get().Open("pages/home.gohtml")
|
||||
_, err := Get().Open(fmt.Sprintf("pages/%s.gohtml", PageHome))
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestGetOS(t *testing.T) {
|
||||
_, err := GetOS().Open("pages/home.gohtml")
|
||||
_, err := GetOS().Open(fmt.Sprintf("pages/%s.gohtml", PageHome))
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue