refactoring
This commit is contained in:
1 parent
c94a2042f1
commit
c9f416dbd3
7 files changed
+36
-19
No files matched your search
+1
-4
@@ -12,14 +12,11 @@ func TestCreateKeyCommand(t *testing.T) {
|
||||
if c.Int("size") != 22 {
|
||||
t.Error("wrong size")
|
||||
}
|
||||
if c.String("password") != "money" {
|
||||
t.Error("wrong password")
|
||||
}
|
||||
hasBeenCalled = true
|
||||
}
|
||||
app := cli.NewApp()
|
||||
app.Commands = []cli.Command{c}
|
||||
args := []string{"file", "createkey", "-size", "22", "-password", "money"}
|
||||
args := []string{"file", "createkey", "-size", "22"}
|
||||
app.Run(args)
|
||||
if !hasBeenCalled {
|
||||
t.Error("sub command *createkey* has not been called")
|
||||
|
||||
Reference in new issue
Block a user