Files
docker-go-dev/main_test.go
Christopher Crone bff6023b1a Initial commit
2020-06-02 17:54:36 +02:00

20 lines
325 B
Go

package main
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestEcho(t *testing.T) {
// Test happy path
err := echo([]string{"bin-name", "hello", "world!"})
require.NoError(t, err)
}
func TestEchoErrorNoArgs(t *testing.T) {
// Test empty arguments
err := echo([]string{})
require.Error(t, err)
}