()
| 1027 | |
| 1028 | #[tokio::test] |
| 1029 | async fn create_branch_succeeds_on_201() { |
| 1030 | let (server, backend) = server_and_backend().await; |
| 1031 | Mock::given(method("POST")) |
| 1032 | .and(path("/v1/repos/test/git/branches/create")) |
| 1033 | .and(wiremock::matchers::body_json(json!({ |
| 1034 | "name":"feat/x","base":"main" |
| 1035 | }))) |
| 1036 | .respond_with(ResponseTemplate::new(201).set_body_json(json!({}))) |
| 1037 | .mount(&server) |
| 1038 | .await; |
| 1039 | |
| 1040 | backend |
| 1041 | .create_branch(WorkspaceGitCreateBranchRequest { |
| 1042 | name: "feat/x".into(), |
| 1043 | base: "main".into(), |
| 1044 | }) |
| 1045 | .await |
| 1046 | .unwrap(); |
| 1047 | } |
| 1048 | |
| 1049 | #[tokio::test] |
| 1050 | async fn create_branch_409_yields_remote_git_conflict() { |
nothing calls this directly
no test coverage detected