| 937 | |
| 938 | #[test] |
| 939 | fn test_json_response_format() { |
| 940 | // Verify the JSON response format matches what Claude Code expects |
| 941 | let message = "Atomic is tracking this session."; |
| 942 | let response = serde_json::json!({ |
| 943 | "systemMessage": message |
| 944 | }); |
| 945 | let json = serde_json::to_string(&response).unwrap(); |
| 946 | assert!(json.contains("systemMessage")); |
| 947 | assert!(json.contains("Atomic is tracking this session.")); |
| 948 | |
| 949 | // Parse it back to verify structure |
| 950 | let parsed: serde_json::Value = serde_json::from_str(&json).unwrap(); |
| 951 | assert_eq!( |
| 952 | parsed["systemMessage"].as_str(), |
| 953 | Some("Atomic is tracking this session.") |
| 954 | ); |
| 955 | } |
| 956 | |
| 957 | #[test] |
| 958 | fn test_json_response_no_message() { |