1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-10-30 23:58:09 +02:00
Files
goreleaser/pipeline/valid/valid_test.go
Jorin Vogel 37034012c4 Default value for repo option.
It's loaded from Git config.
Thanks @caarlos0 for implementing remoteRepo func!
2017-01-14 19:12:20 +01:00

29 lines
532 B
Go

package valid
import (
"testing"
"github.com/goreleaser/releaser/config"
"github.com/goreleaser/releaser/context"
"github.com/stretchr/testify/assert"
)
func runPipe(repo, bin string) error {
var config = &config.ProjectConfig{
Repo: repo,
BinaryName: bin,
}
var ctx = &context.Context{
Config: config,
}
return Pipe{}.Run(ctx)
}
func TestValidadeMissingBinaryName(t *testing.T) {
assert.Error(t, runPipe("a/b", ""))
}
func TestValidadeMinimalConfig(t *testing.T) {
assert.NoError(t, runPipe("", "a"))
}