diff --git a/test/e2e/full-downstream/full-downstream.test.ts b/test/e2e/full-downstream/full-downstream.test.ts index e29ebe77..1cfb047e 100644 --- a/test/e2e/full-downstream/full-downstream.test.ts +++ b/test/e2e/full-downstream/full-downstream.test.ts @@ -187,13 +187,23 @@ test("PR from owner1/target:branchA to owner2/target:branchB while using mapping mockApi: [ moctokit.rest.repos .get({ - owner: "owner1", - repo: /project(1|2|3|4)/, + owner: "owner2", + repo: "project2", }) .setResponse({ status: 404, data: {}, - repeat: 4 + repeat: 1 + }), + moctokit.rest.repos + .get({ + owner: "owner2", + repo: /project(1|3|4)/, + }) + .setResponse({ + status: 200, + data: {}, + repeat: 3 }), moctokit.rest.repos .listForks({ @@ -313,7 +323,7 @@ test("PR from owner1/target:branchA to owner2/target:branchB while using mapping ); expect(group4.output).toEqual( expect.stringContaining( - "Merged owner1/project4:branchA into branch 8.x" + "Merged owner2/project4:branchA into branch 8.x" ) ); diff --git a/test/e2e/single-pr/single-pr.test.ts b/test/e2e/single-pr/single-pr.test.ts index 3fb56958..e83b6a74 100644 --- a/test/e2e/single-pr/single-pr.test.ts +++ b/test/e2e/single-pr/single-pr.test.ts @@ -262,7 +262,7 @@ test("PR from owner2/target:branchA to owner1/target:branchB", async () => { mockApi: [ moctokit.rest.repos .get({ - owner: "owner1", + owner: "owner2", repo: "project3", }) .setResponse({ @@ -270,7 +270,7 @@ test("PR from owner2/target:branchA to owner1/target:branchB", async () => { data: { name: "project3", owner: { - login: "owner1", + login: "owner2", }, }, }), @@ -391,7 +391,7 @@ test("PR from owner2/target:branchA to owner1/target-different-name:branchB", as mockApi: [ moctokit.rest.repos .get({ - owner: "owner1", + owner: "owner2", repo: "project1", }) .setResponse({