Compare commits
3 Commits
fix/user-h
...
feat/db-vo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
404b93d551 | ||
|
|
20aea2a37a | ||
|
|
dea32e54c9 |
@@ -67,5 +67,9 @@ services:
|
|||||||
# NOTE: Please UPDATE THIS PASSWORD!
|
# NOTE: Please UPDATE THIS PASSWORD!
|
||||||
POSTGRES_PASSWORD: testpass
|
POSTGRES_PASSWORD: testpass
|
||||||
POSTGRES_DB: hoppscotch
|
POSTGRES_DB: hoppscotch
|
||||||
|
# NOTE: Please UNCOMMENT and UPDATE THE Path
|
||||||
|
# volumes:
|
||||||
|
# - <custom_path>:/var/lib/postgresql/data
|
||||||
|
# Replace <custom_path> with path on your device
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -360,15 +360,13 @@ describe('UserHistoryService', () => {
|
|||||||
});
|
});
|
||||||
describe('removeRequestFromHistory', () => {
|
describe('removeRequestFromHistory', () => {
|
||||||
test('Should resolve right and delete request from users history', async () => {
|
test('Should resolve right and delete request from users history', async () => {
|
||||||
const executedOn = new Date();
|
|
||||||
|
|
||||||
mockPrisma.userHistory.delete.mockResolvedValueOnce({
|
mockPrisma.userHistory.delete.mockResolvedValueOnce({
|
||||||
userUid: 'abc',
|
userUid: 'abc',
|
||||||
id: '1',
|
id: '1',
|
||||||
request: [{}],
|
request: [{}],
|
||||||
responseMetadata: [{}],
|
responseMetadata: [{}],
|
||||||
reqType: ReqType.REST,
|
reqType: ReqType.REST,
|
||||||
executedOn: executedOn,
|
executedOn: new Date(),
|
||||||
isStarred: false,
|
isStarred: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -378,7 +376,7 @@ describe('UserHistoryService', () => {
|
|||||||
request: JSON.stringify([{}]),
|
request: JSON.stringify([{}]),
|
||||||
responseMetadata: JSON.stringify([{}]),
|
responseMetadata: JSON.stringify([{}]),
|
||||||
reqType: ReqType.REST,
|
reqType: ReqType.REST,
|
||||||
executedOn: executedOn,
|
executedOn: new Date(),
|
||||||
isStarred: false,
|
isStarred: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -386,7 +384,7 @@ describe('UserHistoryService', () => {
|
|||||||
await userHistoryService.removeRequestFromHistory('abc', '1'),
|
await userHistoryService.removeRequestFromHistory('abc', '1'),
|
||||||
).toEqualRight(userHistory);
|
).toEqualRight(userHistory);
|
||||||
});
|
});
|
||||||
test('Should resolve left and error out when req id is invalid', async () => {
|
test('Should resolve left and error out when req id is invalid ', async () => {
|
||||||
mockPrisma.userHistory.delete.mockResolvedValueOnce(null);
|
mockPrisma.userHistory.delete.mockResolvedValueOnce(null);
|
||||||
|
|
||||||
return expect(
|
return expect(
|
||||||
|
|||||||
Reference in New Issue
Block a user