Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

Commit

lower headline

syntaqxcommitted Parentdb67273Browse files
1 file+4−20/1 viewed
+4−2
305305 /// there: g1t has one.
306306 pub(crate) fn portal_fields() -> Vec<(&'static str, String)> {
307307 let mut fields = vec![
308− ("business_profile[headline]", "g1t billing: your card, billing details, tax IDs and invoices".to_owned()),
308+ ("business_profile[headline]", "g1t: your card, billing details, tax IDs and invoices".to_owned()),
309309 ("business_profile[privacy_policy_url]", "https://g1t.sh/policies/privacy".to_owned()),
310310 ("business_profile[terms_of_service_url]", "https://g1t.sh/policies/terms".to_owned()),
311311 ("features[customer_update][enabled]", "true".to_owned()),
13621362 ] {
13631363 assert_eq!(has(&fields, name).as_deref(), Some(value), "{name}");
13641364 }
1365− assert!(has(&fields, "business_profile[headline]").is_some());
1365+ let headline = has(&fields, "business_profile[headline]").unwrap();
1366+ assert!(!headline.is_empty());
1367+ assert!(headline.chars().count() <= 60, "Stripe limits the portal headline to 60 characters");
13661368 // Stripe wants the reasons whenever it asks for one.
13671369 assert_eq!(has(&fields, "features[subscription_cancel][cancellation_reason][options][7]").as_deref(), Some("other"));
13681370 let mut names: Vec<&str> = fields.iter().map(|(n, _)| *n).collect();

Comments

Sign in to comment.