1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/pipeline/fpm/fpm_test.go
Carlos Alexandro Becker 76cfa61407
refactor: remove fpm in favor of nfpm (#567)
* refactor: remove fpm

* refactor: remove fpm

* refactor: .travis.yml

* chore: more cleanup

* chore: fix deploy
2018-02-26 18:49:58 -03:00

38 lines
732 B
Go

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())
}
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)
}