Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
use authentication_service_client::AuthServiceClient;
use wiremock::matchers::{body_json, header, method, path};
use wiremock::{Mock, MockServer, ResponseTemplate};
#[tokio::test]
async fn settle_requests_carry_the_camel_case_user_id() {
let server = MockServer::start().await;
Mock::given(method("POST"))
.and(path("/internal/ai-billing/settle"))
.and(header("x-internal-auth-key", "key"))
.and(body_json(
serde_json::json!({"userId": "macro|[email protected]"}),
))
.respond_with(ResponseTemplate::new(204))
.expect(1)
.mount(&server)
.await;
let client = AuthServiceClient::new("key".to_string(), server.uri());
client.settle_ai_billing("macro|[email protected]").await.unwrap();
}