mirror of
https://github.com/tarampampam/error-pages.git
synced 2024-08-30 18:22:40 +00:00
27 lines
491 B
Go
27 lines
491 B
Go
package build_test
|
|
|
|
import (
|
|
"flag"
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/urfave/cli/v2"
|
|
"go.uber.org/goleak"
|
|
"go.uber.org/zap"
|
|
|
|
"gh.tarampamp.am/error-pages/internal/cli/build"
|
|
)
|
|
|
|
func TestNewCommand(t *testing.T) {
|
|
defer goleak.VerifyNone(t)
|
|
|
|
cmd := build.NewCommand(zap.NewNop())
|
|
|
|
assert.NotEmpty(t, cmd.Flags)
|
|
|
|
assert.Error(t, cmd.Run(
|
|
cli.NewContext(cli.NewApp(), &flag.FlagSet{}, nil),
|
|
"",
|
|
), "should fail because of missing external services")
|
|
}
|