test arg parsing even more

This commit is contained in:
2024-03-06 16:10:53 +05:30
parent 69d2eb70a1
commit d856a3bcd7

View File

@@ -26,5 +26,13 @@ func TestParse(t *testing.T) {
assert.Equal(t, shouldCommit, false)
assert.Equal(t, shouldStage, false)
})
t.Run("fake arg", func(t *testing.T) {
error,_,_,_,_,_ := Parse([]string{"-f"})
assert.NotEqual(t, error, nil)
})
t.Run("excess arg", func(t *testing.T) {
error,_,_,_,_,_ := Parse([]string{"type","scope","fool me"})
assert.NotEqual(t, error, nil)
})
}