Skip to content

Commit d1e32a8

Browse files
test(server): a PR's repository wins over the checkout's for host media
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a53907f commit d1e32a8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎apps/server/src/assets/AssetAccess.test.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,6 +1559,10 @@ describe("AssetAccess", () => {
15591559
// The upstream sent no type, so it comes from the file name the host gave the media.
15601560
expect(response.headers["content-type"]).toBe("image/png");
15611561
expect(response.headers["content-length"]).toBe("5");
1562+
1563+
// A pull request's own repository wins over the checkout it is shown in.
1564+
yield* sourceControlMediaResponse({ ...asset, repository: "enterprise/private" }, {});
1565+
expect(fetched.at(-1)?.repository).toBe("enterprise/private");
15621566
}).pipe(
15631567
Effect.provide(Layer.mergeAll(layerTest, layerDrivers, layerIdentities)),
15641568
Effect.scoped,

0 commit comments

Comments
 (0)