1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-26 04:22:05 +02:00
goreleaser/internal/pipe/publish/publish_test.go

28 lines
638 B
Go
Raw Normal View History

2018-10-05 09:22:53 -03:00
package publish
import (
"testing"
"github.com/goreleaser/goreleaser/internal/pipe"
"github.com/goreleaser/goreleaser/pkg/config"
"github.com/goreleaser/goreleaser/pkg/context"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
)
func TestDescription(t *testing.T) {
assert.NotEmpty(t, Pipe{}.String())
}
func TestPublishDisable(t *testing.T) {
var ctx = context.New(config.Project{})
ctx.SkipPublish = true
require.EqualError(t, Pipe{}.Run(ctx), pipe.ErrSkipPublishEnabled.Error())
}
2018-10-12 00:29:03 -03:00
func TestPublish(t *testing.T) {
var ctx = context.New(config.Project{})
require.NoError(t, Pipe{}.Run(ctx))
}