mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
27 lines
653 B
Go
27 lines
653 B
Go
package defaults
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestRepoName(t *testing.T) {
|
|
assert := assert.New(t)
|
|
repo, err := remoteRepo()
|
|
assert.NoError(err)
|
|
assert.Equal("goreleaser/goreleaser", repo.String())
|
|
}
|
|
|
|
func TestExtractReporFromGitURL(t *testing.T) {
|
|
assert := assert.New(t)
|
|
repo := extractRepoFromURL("git@github.com:goreleaser/goreleaser.git")
|
|
assert.Equal("goreleaser/goreleaser", repo.String())
|
|
}
|
|
|
|
func TestExtractReporFromHttpsURL(t *testing.T) {
|
|
assert := assert.New(t)
|
|
repo := extractRepoFromURL("https://github.com/goreleaser/goreleaser.git")
|
|
assert.Equal("goreleaser/goreleaser", repo.String())
|
|
}
|