MCPcopy Create free account
hub / github.com/AI45Lab/Code / status_happy_path

Function status_happy_path

core/src/workspace/remote_git.rs:961–981  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 2

server_and_backendFunction · 0.85
statusMethod · 0.45

Tested by

no test coverage detected