Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
wnederhof committed Mar 28, 2024
1 parent c60fae6 commit a49cf95
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/cli/arg_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,20 @@ func TestParseArgs(t *testing.T) {
"someField:date_opt",
"someField:boolean_opt",
"someField:Employer",
})
}, 1)
assert.Equal(t, expected, actual)
}

func TestParseArgsInvalidInput(t *testing.T) {
_, err := parseArgsFromStrings([]string{})
_, err := parseArgsFromStrings([]string{}, 1)
assert.Equal(t, err, errors.New("usage: <name> (<fieldName>:<fieldType>)+"))

_, err = parseArgsFromStrings([]string{"test"})
_, err = parseArgsFromStrings([]string{"test"}, 1)
assert.Equal(t, err, errors.New("usage: <name> (<fieldName>:<fieldType>)+"))

_, err = parseArgsFromStrings([]string{"test", "fieldName:something:else"})
_, err = parseArgsFromStrings([]string{"test", "fieldName:something:else"}, 1)
assert.Equal(t, err, errors.New("usage: <name> (<fieldName>:<fieldType>)+"))

_, err = parseArgsFromStrings([]string{"test", "fieldName:float"})
_, err = parseArgsFromStrings([]string{"test", "fieldName:float"}, 1)
assert.Equal(t, err, errors.New("unknown type float"))
}

0 comments on commit a49cf95

Please sign in to comment.