From 29383806f6522ba51ed0db31671246de8f2dc69a Mon Sep 17 00:00:00 2001 From: Tim Date: Wed, 4 Dec 2024 17:09:15 +0100 Subject: [PATCH] test: fix subtitles unit tests --- src/unit_tests/serde/default_tokens_ext.rs | 4 +++- src/unit_tests/serde/subtitles.rs | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/unit_tests/serde/default_tokens_ext.rs b/src/unit_tests/serde/default_tokens_ext.rs index 3d22a9e47..b3462f6e9 100644 --- a/src/unit_tests/serde/default_tokens_ext.rs +++ b/src/unit_tests/serde/default_tokens_ext.rs @@ -56,8 +56,10 @@ impl DefaultTokens for Subtitles { vec![ Token::Struct { name: "Subtitles", - len: 2, + len: 3, }, + Token::Str("id"), + Token::Str(""), Token::Str("lang"), Token::Str(""), Token::Str("url"), diff --git a/src/unit_tests/serde/subtitles.rs b/src/unit_tests/serde/subtitles.rs index 576e8f0f1..a100d4c5a 100644 --- a/src/unit_tests/serde/subtitles.rs +++ b/src/unit_tests/serde/subtitles.rs @@ -6,14 +6,17 @@ use url::Url; fn subtitles() { assert_tokens( &Subtitles { + id: "id".to_owned(), lang: "lang".to_owned(), url: Url::parse("https://url").unwrap(), }, &[ Token::Struct { name: "Subtitles", - len: 2, + len: 3, }, + Token::Str("id"), + Token::Str("id"), Token::Str("lang"), Token::Str("lang"), Token::Str("url"),