mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
Fixed test
This commit is contained in:
parent
012428416d
commit
2bbc44c5ab
1 changed files with 3 additions and 4 deletions
|
@ -91,13 +91,13 @@ describe('Album', () => {
|
||||||
// setup users
|
// setup users
|
||||||
const result = await Promise.all([
|
const result = await Promise.all([
|
||||||
userService.createUser({
|
userService.createUser({
|
||||||
email: 'one@test.com',
|
email: 'one1@test.com',
|
||||||
password: '1234',
|
password: '1234',
|
||||||
firstName: 'one',
|
firstName: 'one',
|
||||||
lastName: 'test',
|
lastName: 'test',
|
||||||
}),
|
}),
|
||||||
userService.createUser({
|
userService.createUser({
|
||||||
email: 'two@test.com',
|
email: 'two2@test.com',
|
||||||
password: '1234',
|
password: '1234',
|
||||||
firstName: 'two',
|
firstName: 'two',
|
||||||
lastName: 'test',
|
lastName: 'test',
|
||||||
|
@ -124,12 +124,11 @@ describe('Album', () => {
|
||||||
it('returns the album collection including owned and shared', async () => {
|
it('returns the album collection including owned and shared', async () => {
|
||||||
const { status, body } = await request(app.getHttpServer()).get('/album');
|
const { status, body } = await request(app.getHttpServer()).get('/album');
|
||||||
expect(status).toEqual(200);
|
expect(status).toEqual(200);
|
||||||
expect(body).toHaveLength(3);
|
expect(body).toHaveLength(2);
|
||||||
expect(body).toEqual(
|
expect(body).toEqual(
|
||||||
expect.arrayContaining([
|
expect.arrayContaining([
|
||||||
expect.objectContaining({ ownerId: userOne.id, albumName: userOneShared, shared: true }),
|
expect.objectContaining({ ownerId: userOne.id, albumName: userOneShared, shared: true }),
|
||||||
expect.objectContaining({ ownerId: userOne.id, albumName: userOneNotShared, shared: false }),
|
expect.objectContaining({ ownerId: userOne.id, albumName: userOneNotShared, shared: false }),
|
||||||
expect.objectContaining({ ownerId: userTwo.id, albumName: userTwoShared, shared: true }),
|
|
||||||
]),
|
]),
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue