1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/pkg/build/build_test.go
Carlos Alexandro Becker 64b1f14a86
refactor: better code organization (#757)
* refactor: merging archive in the same repo

* refactor: merging archive in the same repo

* refactor: better organizing packages

* refactor: fixing renames

* fix: new dep version

* fix: makefile

* fix: zip/tar tests

* fix: gitigonore

* fix: s3 tests

* fix: archive test
2018-08-14 23:50:20 -03:00

25 lines
507 B
Go

package build
import (
"testing"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/stretchr/testify/assert"
)
type dummy struct{}
func (*dummy) WithDefaults(build config.Build) config.Build {
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"))
}