-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TST - convergeance and reset password
- Loading branch information
1 parent
61350f0
commit ab728a1
Showing
7 changed files
with
47 additions
and
31 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
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 |
---|---|---|
|
@@ -53,31 +53,26 @@ describe("PG DataSource", () => { | |
expect(result).toStrictEqual([OutputData]) | ||
}) | ||
|
||
// TODO | ||
test("create", async () => { | ||
const InputData: UserRequesCreationtModel = { | ||
last_name: "Smith", | ||
first_name: "John", | ||
email: "[email protected]", | ||
password: "test123!", | ||
organisation: "LOV", | ||
country: "France", | ||
user_planned_usage: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." | ||
} | ||
|
||
const ds = new SQLiteUserDataSource(mockDatabase); | ||
const inputData: UserRequesCreationtModel = { | ||
last_name: "Smith", | ||
first_name: "John", | ||
email: "[email protected]", | ||
password: "123test!", | ||
organisation: "LOV", | ||
country: "France", | ||
user_planned_usage: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." | ||
} | ||
await ds.create(inputData); | ||
expect(mockDatabase.run).toHaveBeenCalledWith("INSERT INTO user (name) VALUES ($1)", ["Smith"]) | ||
}) | ||
describe('create method', () => { | ||
test('should insert a user into the database', async () => { | ||
const ds = new SQLiteUserDataSource(mockDatabase); | ||
const inputData: UserRequesCreationtModel = { | ||
last_name: "Smith", | ||
first_name: "John", | ||
email: "[email protected]", | ||
password: "123test!", | ||
organisation: "LOV", | ||
country: "France", | ||
user_planned_usage: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." | ||
} | ||
await ds.create(inputData); | ||
expect(mockDatabase.run).toHaveBeenCalledWith("INSERT INTO user (name) VALUES ($1)", ["Smith"]) | ||
}); | ||
|
||
|
||
}); | ||
|
||
|
||
// test("deleteOne", async () => { | ||
// const ds = new SQLiteUserDataSource(mockDatabase); | ||
|
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