|
|
|
@ -362,6 +362,26 @@ describe('/albums', () => {
|
|
|
|
shared: true,
|
|
|
|
shared: true,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it('should not count trashed assets', async () => {
|
|
|
|
|
|
|
|
await utils.deleteAssets(user1.accessToken, [user1Asset2.id]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { status, body } = await request(app)
|
|
|
|
|
|
|
|
.get(`/albums/${user2Albums[0].id}?withoutAssets=true`)
|
|
|
|
|
|
|
|
.set('Authorization', `Bearer ${user1.accessToken}`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
expect(status).toBe(200);
|
|
|
|
|
|
|
|
expect(body).toEqual({
|
|
|
|
|
|
|
|
...user2Albums[0],
|
|
|
|
|
|
|
|
assets: [],
|
|
|
|
|
|
|
|
assetCount: 1,
|
|
|
|
|
|
|
|
lastModifiedAssetTimestamp: expect.any(String),
|
|
|
|
|
|
|
|
endDate: expect.any(String),
|
|
|
|
|
|
|
|
startDate: expect.any(String),
|
|
|
|
|
|
|
|
albumUsers: expect.any(Array),
|
|
|
|
|
|
|
|
shared: true,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
describe('GET /albums/statistics', () => {
|
|
|
|
describe('GET /albums/statistics', () => {
|
|
|
|
|