tests: fix input test
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
576613e46a
commit
3bfa056b9b
@ -7,13 +7,16 @@ import (
|
||||
)
|
||||
|
||||
func TestInputDir(t *testing.T) {
|
||||
st := &RouteState{}
|
||||
st := &RouteState{
|
||||
LayoutSource: DirInput("/tmp/source", []string{}),
|
||||
}
|
||||
require.NoError(t, st.AddInput("www.source", DirInput(".", []string{})))
|
||||
|
||||
route, err := NewRoute(st)
|
||||
require.NoError(t, err)
|
||||
|
||||
localdirs := route.LocalDirs()
|
||||
require.Len(t, localdirs, 1)
|
||||
require.Equal(t, ".", localdirs["."])
|
||||
require.Len(t, localdirs, 2)
|
||||
require.Contains(t, localdirs, ".")
|
||||
require.Contains(t, localdirs, "/tmp/source")
|
||||
}
|
||||
|
Reference in New Issue
Block a user