| 305 | 305 | | /// there: g1t has one. |
| 306 | 306 | | pub(crate) fn portal_fields() -> Vec<(&'static str, String)> { |
| 307 | 307 | | 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()), |
| 309 | 309 | | ("business_profile[privacy_policy_url]", "https://g1t.sh/policies/privacy".to_owned()), |
| 310 | 310 | | ("business_profile[terms_of_service_url]", "https://g1t.sh/policies/terms".to_owned()), |
| 311 | 311 | | ("features[customer_update][enabled]", "true".to_owned()), |
| ⋯ |
| 1362 | 1362 | | ] { |
| 1363 | 1363 | | assert_eq!(has(&fields, name).as_deref(), Some(value), "{name}"); |
| 1364 | 1364 | | } |
| 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"); |
| 1366 | 1368 | | // Stripe wants the reasons whenever it asks for one. |
| 1367 | 1369 | | assert_eq!(has(&fields, "features[subscription_cancel][cancellation_reason][options][7]").as_deref(), Some("other")); |
| 1368 | 1370 | | let mut names: Vec<&str> = fields.iter().map(|(n, _)| *n).collect(); |