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

38 lines
732 B
Go
Raw Normal View History

2017-04-15 15:41:41 -03:00
package fpm
import (
"testing"
"github.com/goreleaser/goreleaser/config"
"github.com/goreleaser/goreleaser/context"
"github.com/stretchr/testify/assert"
)
func TestDescription(t *testing.T) {
assert.NotEmpty(t, Pipe{}.String())
2017-04-15 15:41:41 -03:00
}
func TestDefault(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{
FPM: config.NFPM{
Formats: []string{"deb"},
},
},
}
assert.NoError(t, Pipe{}.Default(ctx))
assert.Equal(t, ctx.Config.FPM, ctx.Config.NFPM)
}
func TestDefaultSet(t *testing.T) {
var ctx = &context.Context{
Config: config.Project{
NFPM: config.NFPM{
Formats: []string{"deb"},
},
},
}
assert.NoError(t, Pipe{}.Default(ctx))
assert.Equal(t, config.NFPM{}, ctx.Config.FPM)
}