PosterShape ser/de tests unified
@@ -2,43 +2,31 @@ use crate::types::resource::PosterShape;
use serde_test::{assert_de_tokens, assert_tokens, Token};
#[test]
-fn ser_de_poster_shape_square() {
+fn ser_de_poster_shape() {
assert_tokens(
- &PosterShape::Square,
+ &vec![
+ PosterShape::Square,
+ PosterShape::Landscape,
+ PosterShape::Poster,
+ ],
&[
+ Token::Seq { len: Some(3) },
Token::Enum {
name: "PosterShape",
},
Token::Str("square"),
Token::Unit,
- ],
- );
-}
-
-#[test]
-fn ser_de_poster_shape_landscaoe() {
- assert_tokens(
- &PosterShape::Landscape,
- &[
Token::Enum {
name: "PosterShape",
},
Token::Str("landscape"),
Token::Unit,
- ],
- );
-}
-
-#[test]
-fn ser_de_poster_shape_poster() {
- assert_tokens(
- &PosterShape::Poster,
- &[
Token::Enum {
name: "PosterShape",
},
Token::Str("poster"),
Token::Unit,
+ Token::SeqEnd,
],
);
assert_de_tokens(
