()
| 884 | |
| 885 | #[test] |
| 886 | fn test_credit_json_roundtrip() { |
| 887 | let credit = Credit::ai_assisted( |
| 888 | "alice", |
| 889 | Some("alice@example.com"), |
| 890 | AIVendor::Anthropic, |
| 891 | "claude-sonnet-4", |
| 892 | test_hash(), |
| 893 | test_timestamp(), |
| 894 | ); |
| 895 | |
| 896 | let json = serde_json::to_string(&credit).unwrap(); |
| 897 | let parsed: Credit = serde_json::from_str(&json).unwrap(); |
| 898 | assert_eq!(credit, parsed); |
| 899 | } |
| 900 | |
| 901 | // LineCredit Tests |
| 902 |
nothing calls this directly
no test coverage detected