-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #40
- Loading branch information
Showing
21 changed files
with
93 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,8 @@ describe("User Pool Client", () => { | |
AllowedOAuthFlowsUserPoolClient: false, | ||
ClientId: expect.stringMatching(/^[a-z0-9]{25}$/), | ||
ClientName: "clientName", | ||
CreationDate: now.getTime(), | ||
LastModifiedDate: now.getTime(), | ||
CreationDate: Math.floor(now.getTime() / 1000), | ||
LastModifiedDate: Math.floor(now.getTime() / 1000), | ||
RefreshTokenValidity: 30, | ||
UserPoolId: "local", | ||
}); | ||
|
@@ -84,7 +84,7 @@ describe("User Pool Client", () => { | |
|
||
describe("saveUser", () => { | ||
it("saves the user", async () => { | ||
const now = new Date().getTime(); | ||
const now = Math.floor(new Date().getTime() / 1000); | ||
const set = jest.fn(); | ||
|
||
const userPool = await UserPoolClientService.create( | ||
|
@@ -154,8 +154,8 @@ describe("User Pool Client", () => { | |
{ Name: "email", Value: "[email protected]" }, | ||
{ Name: "phone_number", Value: "0411000111" }, | ||
], | ||
UserLastModifiedDate: new Date().getTime(), | ||
UserCreateDate: new Date().getTime(), | ||
UserLastModifiedDate: Math.floor(new Date().getTime() / 1000), | ||
UserCreateDate: Math.floor(new Date().getTime() / 1000), | ||
Enabled: true, | ||
}, | ||
}; | ||
|
@@ -259,8 +259,8 @@ describe("User Pool Client", () => { | |
{ Name: "email", Value: "[email protected]" }, | ||
{ Name: "phone_number", Value: "0411000111" }, | ||
], | ||
UserLastModifiedDate: new Date().getTime(), | ||
UserCreateDate: new Date().getTime(), | ||
UserLastModifiedDate: Math.floor(new Date().getTime() / 1000), | ||
UserCreateDate: Math.floor(new Date().getTime() / 1000), | ||
Enabled: true, | ||
}, | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,8 +71,8 @@ describe("ForgotPassword target", () => { | |
Attributes: [{ Name: "email", Value: "[email protected]" }], | ||
Enabled: true, | ||
Password: "hunter2", | ||
UserCreateDate: now.getTime(), | ||
UserLastModifiedDate: now.getTime(), | ||
UserCreateDate: Math.floor(now.getTime() / 1000), | ||
UserLastModifiedDate: Math.floor(now.getTime() / 1000), | ||
UserStatus: "CONFIRMED", | ||
Username: "0000-0000", | ||
}); | ||
|
@@ -87,8 +87,8 @@ describe("ForgotPassword target", () => { | |
Attributes: [{ Name: "email", Value: "[email protected]" }], | ||
Enabled: true, | ||
Password: "hunter2", | ||
UserCreateDate: now.getTime(), | ||
UserLastModifiedDate: now.getTime(), | ||
UserCreateDate: Math.floor(now.getTime() / 1000), | ||
UserLastModifiedDate: Math.floor(now.getTime() / 1000), | ||
UserStatus: "CONFIRMED", | ||
Username: "0000-0000", | ||
}, | ||
|
@@ -114,8 +114,8 @@ describe("ForgotPassword target", () => { | |
Attributes: [{ Name: "email", Value: "[email protected]" }], | ||
Enabled: true, | ||
Password: "hunter2", | ||
UserCreateDate: now.getTime(), | ||
UserLastModifiedDate: now.getTime(), | ||
UserCreateDate: Math.floor(now.getTime() / 1000), | ||
UserLastModifiedDate: Math.floor(now.getTime() / 1000), | ||
UserStatus: "CONFIRMED", | ||
Username: "0000-0000", | ||
}); | ||
|
@@ -130,8 +130,8 @@ describe("ForgotPassword target", () => { | |
ConfirmationCode: "1234", | ||
Enabled: true, | ||
Password: "hunter2", | ||
UserCreateDate: now.getTime(), | ||
UserLastModifiedDate: now.getTime(), | ||
UserCreateDate: Math.floor(now.getTime() / 1000), | ||
UserLastModifiedDate: Math.floor(now.getTime() / 1000), | ||
// TODO: validate whether an already confirmed user should stay confirmed when password reset starts? | ||
UserStatus: "CONFIRMED", | ||
Username: "0000-0000", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.