1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/pkg/build/build_test.go

25 lines
507 B
Go
Raw Normal View History

2018-01-21 14:31:08 -02:00
package build
2018-01-23 00:22:00 -02:00
import (
"testing"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
2018-01-23 00:22:00 -02:00
"github.com/stretchr/testify/assert"
)
type dummy struct{}
2018-01-26 19:35:12 -02:00
func (*dummy) WithDefaults(build config.Build) config.Build {
2018-01-23 00:22:00 -02:00
return build
}
func (*dummy) Build(ctx *context.Context, build config.Build, options Options) error {
return nil
}
func TestRegisterAndGet(t *testing.T) {
var builder = &dummy{}
Register("dummy", builder)
assert.Equal(t, builder, For("dummy"))
}