mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-13 10:52:28 -04:00
Fix history
This commit is contained in:
@@ -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/,
|
||||
);
|
||||
|
||||
@@ -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: [] },
|
||||
|
||||
Reference in New Issue
Block a user