mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-08 03:31:59 +02:00
add: more scoop unit tests
This commit is contained in:
parent
98433ca412
commit
12501bdfff
@ -11,9 +11,47 @@ import (
|
||||
"github.com/goreleaser/goreleaser/context"
|
||||
"github.com/goreleaser/goreleaser/internal/artifact"
|
||||
"github.com/goreleaser/goreleaser/internal/client"
|
||||
"github.com/goreleaser/goreleaser/internal/testlib"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDescription(t *testing.T) {
|
||||
assert.NotEmpty(t, Pipe{}.String())
|
||||
}
|
||||
|
||||
func TestDefault(t *testing.T) {
|
||||
_, back := testlib.Mktmp(t)
|
||||
defer back()
|
||||
|
||||
var ctx = &context.Context{
|
||||
Config: config.Project{
|
||||
Builds: []config.Build{
|
||||
{
|
||||
Binary: "foo",
|
||||
Goos: []string{"linux", "darwin"},
|
||||
Goarch: []string{"386", "amd64"},
|
||||
},
|
||||
{
|
||||
Binary: "bar",
|
||||
Goos: []string{"linux", "darwin"},
|
||||
Goarch: []string{"386", "amd64"},
|
||||
Ignore: []config.IgnoredBuild{
|
||||
{Goos: "darwin", Goarch: "amd64"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Binary: "foobar",
|
||||
Goos: []string{"linux"},
|
||||
Goarch: []string{"amd64"},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
assert.NoError(t, Pipe{}.Default(ctx))
|
||||
assert.NotEmpty(t, ctx.Config.Scoop.CommitAuthor.Name)
|
||||
assert.NotEmpty(t, ctx.Config.Scoop.CommitAuthor.Email)
|
||||
}
|
||||
|
||||
func Test_buildManifest(t *testing.T) {
|
||||
type args struct {
|
||||
ctx *context.Context
|
||||
|
Loading…
Reference in New Issue
Block a user