1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/pipeline/defaults/remote_test.go
Carlos Alexandro Becker 5974b4570c
more renames
2017-01-14 20:03:11 -02:00

27 lines
622 B
Go

package defaults
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestRepoName(t *testing.T) {
assert := assert.New(t)
name, err := remoteRepo()
assert.NoError(err)
assert.Equal("goreleaser/goreleaser", name)
}
func TestExtractReporFromGitURL(t *testing.T) {
assert := assert.New(t)
url := extractRepoFromURL("git@github.com:goreleaser/goreleaser.git")
assert.Equal("goreleaser/goreleaser", url)
}
func TestExtractReporFromHttpsURL(t *testing.T) {
assert := assert.New(t)
url := extractRepoFromURL("https://github.com/goreleaser/goreleaser.git")
assert.Equal("goreleaser/goreleaser", url)
}