1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-27 10:58:13 +02:00
immich/server/e2e/client/trash-api.ts
Michel Heusschen 0730b54ca9
fix(server): empty/restore trash (#7161)
* fix(server): empty/restore trash

* add e2e tests

* add e2e tests - part 2
2024-02-17 14:05:43 -06:00

14 lines
507 B
TypeScript

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);
},
};