mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
add minimal test
This commit is contained in:
parent
bb32b91081
commit
41ff818aa0
28
config/config_test.go
Normal file
28
config/config_test.go
Normal file
@ -0,0 +1,28 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"strings"
|
||||
|
||||
"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")
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user