()
| 444 | |
| 445 | #[test] |
| 446 | fn confirmation_code_format() { |
| 447 | let code = generate_confirmation_code(); |
| 448 | // Format: XXX-XXXX (3 chars, dash, 4 chars) = 8 chars total |
| 449 | assert_eq!(code.len(), 8, "code should be 8 chars: {code}"); |
| 450 | assert_eq!( |
| 451 | code.chars().nth(3), |
| 452 | Some('-'), |
| 453 | "code should have dash at position 3: {code}" |
| 454 | ); |
| 455 | assert!( |
| 456 | code.chars().all(|c| c.is_ascii_alphanumeric() || c == '-'), |
| 457 | "code should be alphanumeric + dash: {code}" |
| 458 | ); |
| 459 | } |
| 460 | |
| 461 | #[test] |
| 462 | fn confirmation_codes_are_unique() { |
nothing calls this directly
no test coverage detected