feat: enable downloads from search results
This commit is contained in:
1 parent
cccb214229
commit
9aa79cbce9
3 files changed
+53
-3
No files matched your search
@@ -62,6 +62,28 @@ test("uses a requested album only when it is in the current editorial grants", a
|
||||
);
|
||||
});
|
||||
|
||||
test("restores the queried granted album when Immich omits an asset album association", async () => {
|
||||
const { catalog, immich } = createCatalog({ grantedAlbumIds: ["allowed"] });
|
||||
immich.searchPhotos.mockResolvedValue({
|
||||
items: [{
|
||||
id: "asset-1",
|
||||
type: "IMAGE",
|
||||
originalFileName: "tor.jpg",
|
||||
originalMimeType: "image/jpeg",
|
||||
localDateTime: null,
|
||||
fileCreatedAt: null,
|
||||
albums: [],
|
||||
}],
|
||||
total: 1,
|
||||
nextPage: null,
|
||||
previousPage: null,
|
||||
});
|
||||
|
||||
const result = await catalog.searchVisiblePhotos("editorial-1", { page: 1 });
|
||||
|
||||
expect(result.items[0]?.albums).toEqual([{ id: "allowed" }]);
|
||||
});
|
||||
|
||||
test("does not call Immich when an editorial has no current album grants", async () => {
|
||||
const { catalog, immich } = createCatalog({ grantedAlbumIds: [] });
|
||||
|
||||
|
||||
Reference in new issue
Block a user