Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
tizz98 committed Mar 28, 2019
1 parent 1110beb commit 6d87bc3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion requests_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,5 +489,21 @@ func TestApi_GetEventTypes(t *testing.T) {
}

func TestApi_GetHook(t *testing.T) {
t.SkipNow() // todo
server := testApiServer(t, "123")
defer server.Close()

api := &Api{BaseURL: server.URL, AuthToken: "123"}
resp, err := api.GetHook(GetHookInput{Id: 123})
require.NoError(t, err)

assert.Equal(t, hook{
Id: 12345,
Type: "hooks",
Attributes: hookAttributes{
URL: "http://foo.bar/1",
CreatedAt: time.Date(2016, 8, 23, 19, 15, 24, 0, time.UTC),
State: "active",
Events: []string{"invitee.created", "invitee.canceled"},
},
}, resp.Data[0])
}

0 comments on commit 6d87bc3

Please sign in to comment.