Skip to content

Commit

Permalink
test(userpoolclient): verify UserPoolClient is persisted properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jagregory committed Jul 23, 2021
1 parent 26cf370 commit ecb5829
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion integration-tests/aws-sdk/createUserPoolClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ describe(
"CognitoIdentityServiceProvider.createUserPoolClient",
withCognitoSdk((Cognito) => {
it("can create a new app client", async () => {
const result = await Cognito()
const client = Cognito();

const result = await client
.createUserPoolClient({
ClientName: "test",
UserPoolId: "test",
Expand All @@ -22,6 +24,17 @@ describe(
UserPoolId: "test",
},
});

const createdClient = await client
.describeUserPoolClient({
ClientId: result.UserPoolClient?.ClientId!,
UserPoolId: "test",
})
.promise();

expect(createdClient).toEqual({
UserPoolClient: result.UserPoolClient,
});
});
})
);

0 comments on commit ecb5829

Please sign in to comment.