1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/config/config_test.go
2017-05-10 19:35:44 -07:00

29 lines
589 B
Go

package config
import (
"strings"
"testing"
"github.com/stretchr/testify/assert"
)
func TestRepo(t *testing.T) {
var assert = assert.New(t)
r := Repo{"goreleaser", "godownloader"}
assert.Equal("goreleaser/godownloader", r.String(), "not equal")
}
func TestLoadReader(t *testing.T) {
var conf = `
homepage: &homepage http://goreleaser.github.io
fpm:
homepage: *homepage
`
var assert = assert.New(t)
buf := strings.NewReader(conf)
prop, err := LoadReader(buf)
assert.Nil(err)
assert.Equal("http://goreleaser.github.io", prop.FPM.Homepage, "yaml did not load correctly")
}