main
1package tasks
2
3import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7 "mokhan.ca/xlgmokha/idp/pkg/dto"
8)
9
10func TestCreateClient(t *testing.T) {
11 t.Run("with valid parameters", func(t *testing.T) {
12 request := dto.ClientRegistrationRequest{
13 ClientMetadata: dto.ClientMetadata{
14 ClientName: "jive",
15 RedirectUris: []string{"https://example.com/callback"},
16 },
17 }
18 response, err := CreateClient(request)
19
20 assert.Nil(t, err)
21 assert.NotNil(t, response)
22 })
23}