1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-06 03:13:48 +02:00
goreleaser/internal/client/config_test.go
Drew Stinnett d4e575dd47
test: additional tests for gitlab and others (#2599)
* More checks

* test: Adding more tests around gitlab

* chore: removing log
2021-10-25 10:29:19 -03:00

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