mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(server): empty/restore trash (#7161)
* fix(server): empty/restore trash * add e2e tests * add e2e tests - part 2
This commit is contained in:
parent
69983ff83a
commit
0730b54ca9
5 changed files with 101 additions and 2 deletions
13
server/e2e/client/trash-api.ts
Normal file
13
server/e2e/client/trash-api.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import request from 'supertest';
|
||||
import type { App } from 'supertest/types';
|
||||
|
||||
export const trashApi = {
|
||||
async empty(server: App, accessToken: string) {
|
||||
const { status } = await request(server).post('/trash/empty').set('Authorization', `Bearer ${accessToken}`);
|
||||
expect(status).toBe(204);
|
||||
},
|
||||
async restore(server: App, accessToken: string) {
|
||||
const { status } = await request(server).post('/trash/restore').set('Authorization', `Bearer ${accessToken}`);
|
||||
expect(status).toBe(204);
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue