woodpecker/vendor/github.com/Bugagazavr/go-gitlab-client/hooks_test.go

17 lines
379 B
Go
Raw Normal View History

2015-07-26 23:25:20 +00:00
package gogitlab
import (
2015-08-06 16:22:31 +00:00
"github.com/drone/drone/Godeps/_workspace/src/github.com/stretchr/testify/assert"
2015-07-26 23:25:20 +00:00
"testing"
)
func TestHook(t *testing.T) {
ts, gitlab := Stub("stubs/hooks/show.json")
hook, err := gitlab.ProjectHook("1", "2")
assert.Equal(t, err, nil)
assert.IsType(t, new(Hook), hook)
assert.Equal(t, hook.Url, "http://example.com/hook")
defer ts.Close()
}