mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
76cfa61407
* refactor: remove fpm * refactor: remove fpm * refactor: .travis.yml * chore: more cleanup * chore: fix deploy
38 lines
732 B
Go
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)
|
|
}
|