1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +02:00
goreleaser/internal/client/config_test.go

28 lines
487 B
Go
Raw Normal View History

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)
}