mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-06 03:13:48 +02:00
d4e575dd47
* More checks * test: Adding more tests around gitlab * chore: removing log
28 lines
487 B
Go
28 lines
487 B
Go
package client
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/goreleaser/goreleaser/pkg/config"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestRepoFromRef(t *testing.T) {
|
|
owner := "someowner"
|
|
name := "somename"
|
|
branch := "somebranch"
|
|
token := "sometoken"
|
|
|
|
ref := config.RepoRef{
|
|
Owner: owner,
|
|
Name: name,
|
|
Branch: branch,
|
|
Token: token,
|
|
}
|
|
repo := RepoFromRef(ref)
|
|
|
|
require.Equal(t, owner, repo.Owner)
|
|
require.Equal(t, name, repo.Name)
|
|
require.Equal(t, branch, repo.Branch)
|
|
}
|