mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor: e2e client (#7324)
This commit is contained in:
parent
5c0c98473d
commit
2ebb57cbd4
13 changed files with 19 additions and 146 deletions
|
|
@ -531,8 +531,8 @@ describe(`${AssetController.name} (e2e)`, () => {
|
|||
|
||||
expect(status).toBe(200);
|
||||
expect(body.length).toBe(assets.length);
|
||||
for (let i = 0; i < assets.length; i++) {
|
||||
expect(body[i]).toEqual(expect.objectContaining({ id: assets[i].id }));
|
||||
for (const [i, asset] of assets.entries()) {
|
||||
expect(body[i]).toEqual(expect.objectContaining({ id: asset.id }));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -699,7 +699,7 @@ describe(`${AssetController.name} (e2e)`, () => {
|
|||
|
||||
it("should not upload to another user's library", async () => {
|
||||
const content = randomBytes(32);
|
||||
const library = (await api.libraryApi.getAll(server, user2.accessToken))[0];
|
||||
const [library] = await api.libraryApi.getAll(server, user2.accessToken);
|
||||
await api.assetApi.upload(server, user1.accessToken, 'example-image', { content });
|
||||
|
||||
const { body, status } = await request(server)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue