MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_credit_json_roundtrip

Function test_credit_json_roundtrip

atomic-core/src/change/credit.rs:886–899  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

test_timestampFunction · 0.85
test_hashFunction · 0.70
unwrapMethod · 0.45

Tested by

no test coverage detected