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

Function test_json_author_serialize

atomic-cli/src/commands/change/tests.rs:305–313  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

303
304 #[test]
305 fn test_json_author_serialize() {
306 let json_author = JsonAuthor {
307 name: "Charlie".to_string(),
308 email: Some("charlie@test.com".to_string()),
309 };
310 let json = serde_json::to_string(&json_author).unwrap();
311 assert!(json.contains("\"name\":\"Charlie\""));
312 assert!(json.contains("\"email\":\"charlie@test.com\""));
313 }
314
315 #[test]
316 fn test_json_author_serialize_no_email() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected