spud/cli/cli_test.go

22 lines
345 B
Go
Raw Normal View History

package cli
import (
"testing"
)
func TestGetCliReturnsNonNil(t *testing.T) {
root := GetCli()
if root == nil {
t.Error("Expected to get command pointer, got nil.")
}
}
func TestGetCliReturnsCliRoot(t *testing.T) {
root := GetCli()
if len(root.Commands()) == 0 {
t.Error("Expected to find >= 0 commands mapped, found none.")
}
}