fix: queries for webhooks + improve tests
This commit is contained in:
@@ -6,7 +6,9 @@ import (
|
||||
|
||||
"github.com/authorizerdev/authorizer/server/constants"
|
||||
"github.com/authorizerdev/authorizer/server/crypto"
|
||||
"github.com/authorizerdev/authorizer/server/graph/model"
|
||||
"github.com/authorizerdev/authorizer/server/memorystore"
|
||||
"github.com/authorizerdev/authorizer/server/refs"
|
||||
"github.com/authorizerdev/authorizer/server/resolvers"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
@@ -21,9 +23,13 @@ func webhooksTest(t *testing.T, s TestSetup) {
|
||||
assert.NoError(t, err)
|
||||
req.Header.Set("Cookie", fmt.Sprintf("%s=%s", constants.AdminCookieName, h))
|
||||
|
||||
webhooks, err := resolvers.WebhooksResolver(ctx, nil)
|
||||
webhooks, err := resolvers.WebhooksResolver(ctx, &model.PaginatedInput{
|
||||
Pagination: &model.PaginationInput{
|
||||
Limit: refs.NewInt64Ref(20),
|
||||
},
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
assert.NotEmpty(t, webhooks)
|
||||
assert.Len(t, webhooks.Webhooks, len(s.TestInfo.TestWebhookEventTypes))
|
||||
assert.Len(t, webhooks.Webhooks, len(s.TestInfo.TestWebhookEventTypes)*2)
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user