1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-12-30 10:11:23 +02:00
woodpecker/vendor/github.com/Bugagazavr/go-gitlab-client/gitlab_test.go

14 lines
438 B
Go
Raw Normal View History

2015-07-27 01:25:20 +02:00
package gogitlab
import (
2015-09-30 03:21:17 +02:00
"github.com/stretchr/testify/assert"
2015-07-27 01:25:20 +02:00
"testing"
)
func TestResourceUrl(t *testing.T) {
gitlab := NewGitlab("http://base_url/", "api_path", "token")
assert.Equal(t, gitlab.ResourceUrl(projects_url, nil), "http://base_url/api_path/projects?private_token=token")
assert.Equal(t, gitlab.ResourceUrl(project_url, map[string]string{":id": "123"}), "http://base_url/api_path/projects/123?private_token=token")
}