From 090006fd605fae483c2cc7dc1215917797f80af4 Mon Sep 17 00:00:00 2001 From: Luis Alberto Santos Date: Tue, 3 Sep 2024 18:47:32 +0200 Subject: [PATCH] add test --- tests/tests/it/enums.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/tests/it/enums.rs b/tests/tests/it/enums.rs index 78624aadb..dd1a8ad0c 100644 --- a/tests/tests/it/enums.rs +++ b/tests/tests/it/enums.rs @@ -1,5 +1,6 @@ use std::str::FromStr; +use stripe_billing::plan::{CreatePlanInlineProductParams, CreatePlanProduct}; use stripe_connect::AccountType; use stripe_core::EventType; use stripe_product::price::CreatePriceTiersUpTo; @@ -22,6 +23,15 @@ fn enums_basic() { fn enums_requests() { assert_eq!(serde_json::to_string(&CreatePriceTiersUpTo::Inf).unwrap(), r#""inf""#); assert_eq!(serde_json::to_string(&CreatePriceTiersUpTo::I64(2)).unwrap(), r#"2"#); + + assert_eq!(serde_json::to_string(&CreatePlanProduct::Id("id".into())).unwrap(), r#""id""#); + assert_eq!( + serde_json::to_string(&CreatePlanProduct::InlineProductParams( + CreatePlanInlineProductParams::new("my name".into()) + )) + .unwrap(), + r#"{"name":"my name"}"# + ); } #[test]