mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix(server): cannot share album to owner (#18802)
* fix(server): create shared album * add test * trigger ci * resolve conversation
This commit is contained in:
parent
daf1a48b54
commit
c89ac5b5e5
3 changed files with 24 additions and 0 deletions
|
|
@ -428,6 +428,15 @@ describe('/albums', () => {
|
|||
order: AssetOrder.Desc,
|
||||
});
|
||||
});
|
||||
|
||||
it('should not be able to share album with owner', async () => {
|
||||
const { status, body } = await request(app)
|
||||
.post('/albums')
|
||||
.send({ albumName: 'New album', albumUsers: [{ role: AlbumUserRole.Editor, userId: user1.userId }] })
|
||||
.set('Authorization', `Bearer ${user1.accessToken}`);
|
||||
expect(status).toBe(400);
|
||||
expect(body).toEqual(errorDto.badRequest('Cannot share album with owner'));
|
||||
});
|
||||
});
|
||||
|
||||
describe('PUT /albums/:id/assets', () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue