mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-24 02:41:01 +00:00
16 lines
334 B
Go
16 lines
334 B
Go
package gogitlab
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"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()
|
|
}
|