mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-27 03:37:50 +00:00
test: measure msteams upload options
This commit is contained in:
@@ -334,12 +334,15 @@ describe("uploadToConsentUrl", () => {
|
||||
expect(mockFetch).toHaveBeenCalledOnce();
|
||||
const [url, opts] = firstFetchCall(mockFetch);
|
||||
expect(url).toBe("https://contoso.sharepoint.com/sites/uploads/file.pdf");
|
||||
expect(opts?.method).toBe("PUT");
|
||||
expect(opts?.headers).toEqual(
|
||||
expect.objectContaining({
|
||||
expect(opts).toEqual({
|
||||
method: "PUT",
|
||||
headers: {
|
||||
"User-Agent": buildUserAgent(),
|
||||
"Content-Type": "application/pdf",
|
||||
}),
|
||||
);
|
||||
"Content-Range": "bytes 0-11/12",
|
||||
},
|
||||
body: new Uint8Array(buffer),
|
||||
});
|
||||
});
|
||||
|
||||
it("throws on non-OK response after passing validation", async () => {
|
||||
|
||||
Reference in New Issue
Block a user