Skip to content

Commit 0822caf

Browse files
committed
- fixes unit test for Url replacement in graph batch
1 parent 3d5fc02 commit 0822caf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/common/content/BatchRequestContent.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ const folderDetails = {
1717
name: folderName,
1818
folder: {},
1919
};
20+
const driveRootChildrenPath = "/me/drive/root/children";
2021

21-
const createFolderRequest = new Request(DUMMY_BASE_URL + "/me/drive/root/children", {
22+
const createFolderRequest = new Request(DUMMY_BASE_URL + driveRootChildrenPath, {
2223
method: "POST",
2324
headers: {
2425
"Content-type": "application/json",
@@ -216,7 +217,7 @@ describe("BatchRequestContent.ts", () => {
216217

217218
it("Should parse path with url", async () => {
218219
const req = getCreateFolderRequestCopy();
219-
req.request = new Request("https://graph.microsoft.com/v1.0" + req.request.url);
220+
req.request = new Request("https://graph.microsoft.com/v1.0" + driveRootChildrenPath);
220221
const batchReq = new BatchRequestContent([req]);
221222
const content = await batchReq.getContent();
222223
assert.equal(content.requests[0].url, "/me/drive/root/children");

0 commit comments

Comments
 (0)