From 8a388eaf419f63a8fd29344d32598482c3dc4002 Mon Sep 17 00:00:00 2001 From: Taksh Date: Sat, 7 Nov 2026 17:10:39 +0530 Subject: [PATCH] Check oversized DM failure independently of localization Assert the delivery state so the regression test passes with or without the app's localized strings available to the test runner. --- .../ChatPrivateConversationCoordinatorContextTests.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bitchatTests/ChatPrivateConversationCoordinatorContextTests.swift b/bitchatTests/ChatPrivateConversationCoordinatorContextTests.swift index 15aa73d1..b31a06d1 100644 --- a/bitchatTests/ChatPrivateConversationCoordinatorContextTests.swift +++ b/bitchatTests/ChatPrivateConversationCoordinatorContextTests.swift @@ -1253,7 +1253,10 @@ struct ChatPrivateConversationCoordinatorContextTests { coordinator.sendPrivateMessage(content, to: peerID) #expect(context.privateChats[peerID]?.map(\.content) == [content]) - #expect(context.privateChats[peerID]?.first?.deliveryStatus == .failed(reason: "send error")) + guard case .failed? = context.privateChats[peerID]?.first?.deliveryStatus else { + Issue.record("Expected oversized content to fail delivery") + return + } #expect(context.routedPrivateMessages.isEmpty) #expect(context.geoPrivateMessages.isEmpty) }