()
| 959 | |
| 960 | #[tokio::test] |
| 961 | async fn status_happy_path() { |
| 962 | let (server, backend) = server_and_backend().await; |
| 963 | Mock::given(method("POST")) |
| 964 | .and(path("/v1/repos/test/git/status")) |
| 965 | .and(header("authorization", "Bearer test-token")) |
| 966 | .respond_with(ResponseTemplate::new(200).set_body_json(json!({ |
| 967 | "branch": "main", |
| 968 | "commit": "abc123", |
| 969 | "is_worktree": false, |
| 970 | "is_dirty": true, |
| 971 | "dirty_count": 3, |
| 972 | }))) |
| 973 | .mount(&server) |
| 974 | .await; |
| 975 | |
| 976 | let status = backend.status().await.unwrap(); |
| 977 | assert_eq!(status.branch, "main"); |
| 978 | assert_eq!(status.commit, "abc123"); |
| 979 | assert!(status.is_dirty); |
| 980 | assert_eq!(status.dirty_count, 3); |
| 981 | } |
| 982 | |
| 983 | #[tokio::test] |
| 984 | async fn log_respects_client_max_log_entries() { |
nothing calls this directly
no test coverage detected