This repository has been archived on 2024-07-28. You can view files and clone it, but cannot push or open issues or pull requests.
cairde/ui/input_test.go
decentral1se 253e33266b
All checks were successful
continuous-integration/drone/push Build is passing
wip: more robust input parsing
2023-12-29 11:23:22 +01:00

18 lines
294 B
Go

package ui
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestHandleCommand(t *testing.T) {
msg := handleCommand("/foo", "")
switch msg := msg.(type) {
case cmdMsg:
assert.Equal(t, msg.output, []string{unknownCmdHelp})
default:
assert.IsType(t, msg, cmdMsg{})
}
}