Fix history

This commit is contained in:
Zoe Roux
2026-03-17 12:20:29 +01:00
parent 9b23d0714c
commit ca15f57f30
6 changed files with 258 additions and 164 deletions
-2
View File
@@ -42,11 +42,9 @@ describe("Get series", () => {
);
expect(body.firstEntry.videos).toBeArrayOfSize(1);
// check that it's an iso datetime
console.log(body.createdAt);
expect(body.createdAt).toMatch(
/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+Z/,
);
console.log(body.firstEntry.createdAt);
expect(body.firstEntry.createdAt).toMatch(
/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+Z/,
);
+21
View File
@@ -81,6 +81,27 @@ describe("Video seeding", () => {
expect(vid!.evj[0].entry.slug).toBe(`${madeInAbyss.slug}-s1e13`);
});
it("With history", async () => {
const [resp, body] = await createVideo({
guess: {
title: "mia",
episodes: [{ season: 1, episode: 13 }],
from: "test",
history: [{ title: "toto", from: "tata" }],
},
part: null,
path: "/video/mia-dup-test.mkv",
rendering: "oeunounthsha2",
version: 1,
});
expectStatus(resp, body).toBe(201);
expect(body).toBeArrayOfSize(1);
expect(body[0].id).toBeString();
expect(body[0].guess.history).toBeArrayOfSize(1);
expect(body[0].guess.history[0].title).toBe("toto");
});
it("With movie", async () => {
const [resp, body] = await createVideo({
guess: { title: "bubble", from: "test", history: [] },