Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
lasantosr committed Sep 3, 2024
1 parent 0124c6c commit 090006f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/tests/it/enums.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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]
Expand Down

0 comments on commit 090006f

Please sign in to comment.