tests: fix input test

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi 2021-03-26 16:24:18 -07:00
parent 576613e46a
commit 3bfa056b9b

View File

@ -7,13 +7,16 @@ import (
) )
func TestInputDir(t *testing.T) { func TestInputDir(t *testing.T) {
st := &RouteState{} st := &RouteState{
LayoutSource: DirInput("/tmp/source", []string{}),
}
require.NoError(t, st.AddInput("www.source", DirInput(".", []string{}))) require.NoError(t, st.AddInput("www.source", DirInput(".", []string{})))
route, err := NewRoute(st) route, err := NewRoute(st)
require.NoError(t, err) require.NoError(t, err)
localdirs := route.LocalDirs() localdirs := route.LocalDirs()
require.Len(t, localdirs, 1) require.Len(t, localdirs, 2)
require.Equal(t, ".", localdirs["."]) require.Contains(t, localdirs, ".")
require.Contains(t, localdirs, "/tmp/source")
} }