Default derived for Subtitles in test env
+#[cfg(test)]
+use derivative::Derivative;
use serde::{Deserialize, Serialize};
use url::Url;
#[derive(Clone, PartialEq, Serialize, Deserialize)]
-#[cfg_attr(test, derive(Debug))]
+#[cfg_attr(test, derive(Derivative, Debug))]
+#[cfg_attr(test, derivative(Default))]
pub struct Subtitles {
pub id: String,
// @TODO: ISO 639-2
pub lang: String,
+ #[cfg_attr(
+ test,
+ derivative(Default(value = "Url::parse(\"protocol://host\").unwrap()"))
+ )]
pub url: Url,
}
