fix(discover): dismissing an artist also dismisses its albums
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -63,6 +63,20 @@ describe("discover action API", () => {
|
||||
expect((await prisma.discoverySuggestion.findUnique({ where: { id: s.id } }))!.status).toBe("followed");
|
||||
});
|
||||
|
||||
it("dismissing an artist also dismisses its pending album suggestions", async () => {
|
||||
const a = await prisma.discoverySuggestion.create({
|
||||
data: { kind: "artist", artistMbid: "shared", artistName: "Cand", score: 1, seedCount: 1,
|
||||
sources: ["listenbrainz"], secondaryTypes: [], dedupeKey: "artist:shared:" },
|
||||
});
|
||||
const alb = await prisma.discoverySuggestion.create({
|
||||
data: { kind: "album", artistMbid: "shared", artistName: "Cand", rgMbid: "rgS", album: "Rec",
|
||||
albumReason: "newest", score: 1, seedCount: 1, sources: ["listenbrainz"],
|
||||
secondaryTypes: [], dedupeKey: "album:shared:rgS" },
|
||||
});
|
||||
await post(a.id, { action: "dismiss" });
|
||||
expect((await prisma.discoverySuggestion.findUnique({ where: { id: alb.id } }))!.status).toBe("dismissed");
|
||||
});
|
||||
|
||||
it("want upserts a monitored release from the suggestion and marks wanted", async () => {
|
||||
const s = await album("rgW");
|
||||
const res = await post(s.id, { action: "want" });
|
||||
|
||||
Reference in New Issue
Block a user