Unverified Commit f45eed14 authored by Sam Foo's avatar Sam Foo Committed by GitHub
Browse files

Merge pull request #843 from GuessWhoSamFoo/def_mod

Changed default module for import to /
parents 7284dcaa ba115151
......@@ -53,7 +53,7 @@ func TestImport_http(t *testing.T) {
in := map[string]interface{}{
OptionApp: appMock,
OptionModule: "",
OptionModule: "/",
OptionPath: ts.URL,
}
......
......@@ -49,7 +49,7 @@ func newImportCmd(a app.App) *cobra.Command {
importCmd.Flags().StringP(flagFilename, shortFilename, "", "Filename, directory, or URL for component to import")
viper.BindPFlag(vImportFilename, importCmd.Flags().Lookup(flagFilename))
importCmd.Flags().String(flagModule, "", "Component module")
importCmd.Flags().String(flagModule, "/", "Component module")
viper.BindPFlag(vImportModule, importCmd.Flags().Lookup(flagModule))
return importCmd
......
......@@ -24,12 +24,13 @@ import (
func Test_importCmd(t *testing.T) {
cases := []cmdTestCase{
{
name: "import location",
name: "import location without module",
args: []string{"import", "-f", "location"},
action: actionImport,
expected: map[string]interface{}{
actions.OptionApp: nil,
actions.OptionPath: "location",
actions.OptionApp: nil,
actions.OptionPath: "location",
actions.OptionModule: "/",
},
},
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment