@@ -18,17 +18,17 @@ func TestGetAppPath(t *testing.T) {
18
18
gopath := os .Getenv ("GOPATH" )
19
19
os .Setenv ("GOPATH" , "testpath/test" )
20
20
21
- appPath , importPath , appName , appEnvName , err := getAppPath ([]string {"." })
21
+ appPath , _ , importPath , appName , appEnvName , err := getAppPath ([]string {"." , "/templatepath " })
22
22
if err == nil {
23
23
t .Errorf ("expected error, but got none: %s - %s" , appPath , appName )
24
24
}
25
25
26
- appPath , importPath , appName , appEnvName , err = getAppPath ([]string {"/" })
26
+ appPath , _ , importPath , appName , appEnvName , err = getAppPath ([]string {"/" , "/templatepath " })
27
27
if err == nil {
28
28
t .Errorf ("expected error, but got none: %s - %s" , appPath , appName )
29
29
}
30
30
31
- appPath , importPath , appName , appEnvName , err = getAppPath ([]string {"/test" })
31
+ appPath , _ , importPath , appName , appEnvName , err = getAppPath ([]string {"/test" , "/templatepath " })
32
32
if err != nil {
33
33
t .Error (err )
34
34
}
@@ -45,7 +45,7 @@ func TestGetAppPath(t *testing.T) {
45
45
t .Errorf ("mismatch, got %s" , importPath )
46
46
}
47
47
48
- appPath , importPath , appName , appEnvName , err = getAppPath ([]string {"./stuff/test" })
48
+ appPath , _ , importPath , appName , appEnvName , err = getAppPath ([]string {"./stuff/test" }, "/templatepath" )
49
49
if err != nil {
50
50
t .Error (err )
51
51
}
@@ -279,7 +279,7 @@ func TestNewCmdWalk(t *testing.T) {
279
279
}
280
280
281
281
// check template file write
282
- err = afero .WriteFile (appFS , "/templates/template.go.tmpl" , []byte (`package {{.AppName}}` ), 0644 )
282
+ err = afero .WriteFile (appFS , "/templates/template.go.tmpl" , []byte (`package {{.AppName}}` ), 0644 )
283
283
if err != nil {
284
284
t .Fatal (err )
285
285
}
0 commit comments