All checks were successful
continuous-integration/drone/push Build is passing
18 lines
294 B
Go
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{})
|
|
}
|
|
}
|