summaryrefslogtreecommitdiff
path: root/pkg/tasks
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2022-05-15 21:03:49 -0600
committermo khan <mo@mokhan.ca>2022-05-15 21:03:49 -0600
commit9efaef650d60340e4e5f45ed1f2b847b64c616c4 (patch)
tree9f1b15a0fe0ce5ad8909ca83718fb306fd54cd74 /pkg/tasks
parent6e926d60f2a66021dac431fd03add4796eb2e803 (diff)
test: start to add tests for inserting a new clientHEADmain
Diffstat (limited to 'pkg/tasks')
-rw-r--r--pkg/tasks/create_client_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/tasks/create_client_test.go b/pkg/tasks/create_client_test.go
new file mode 100644
index 0000000..854a20d
--- /dev/null
+++ b/pkg/tasks/create_client_test.go
@@ -0,0 +1,23 @@
+package tasks
+
+import (
+ "testing"
+
+ "github.com/stretchr/testify/assert"
+ "mokhan.ca/xlgmokha/idp/pkg/dto"
+)
+
+func TestCreateClient(t *testing.T) {
+ t.Run("with valid parameters", func(t *testing.T) {
+ request := dto.ClientRegistrationRequest{
+ ClientMetadata: dto.ClientMetadata{
+ ClientName: "jive",
+ RedirectUris: []string{"https://example.com/callback"},
+ },
+ }
+ response, err := CreateClient(request)
+
+ assert.Nil(t, err)
+ assert.NotNil(t, response)
+ })
+}