From f7d7c3905d4f7eb802de30fb2319de8e0d70c1cf Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Mon, 5 Oct 2026 20:17:23 -0400 Subject: [PATCH] fix(test): stop shadowing request() inside #require in ChatMediaViewerTests `let request = try #require(request(...))` declares a local that the #require macro expansion resolves instead of the helper, so the test build failed with "cannot call value of non-function type 'ChatMediaViewerRequest'". Name the local viewer. --- FlipcashTests/Chat/ChatMediaViewerTests.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/FlipcashTests/Chat/ChatMediaViewerTests.swift b/FlipcashTests/Chat/ChatMediaViewerTests.swift index bc9cbcca7..0ff072047 100644 --- a/FlipcashTests/Chat/ChatMediaViewerTests.swift +++ b/FlipcashTests/Chat/ChatMediaViewerTests.swift @@ -45,9 +45,9 @@ struct ChatMediaViewerTests { @Test("A viewable photo opens with its blob and URL") func viewablePhotoOpens() throws { - let request = try #require(request(message(media()))) - #expect(request.blobID == Self.blobID) - #expect(request.remote?.url == Self.remoteURL) + let viewer = try #require(request(message(media()))) + #expect(viewer.blobID == Self.blobID) + #expect(viewer.remote?.url == Self.remoteURL) } @Test("A redacted photo, or one seen while previewing a group, never opens") @@ -69,8 +69,8 @@ struct ChatMediaViewerTests { @Test("A pending send opens on its staged image") func pendingSendOpens() throws { - let request = try #require(request(message(media()), localImage: Self.localImage, remoteURL: nil)) - #expect(request.localImage === Self.localImage) + let viewer = try #require(request(message(media()), localImage: Self.localImage, remoteURL: nil)) + #expect(viewer.localImage === Self.localImage) } // MARK: - Viewer