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.
This commit is contained in:
Taksh 2026-11-07 17:10:39 +05:30
parent b00939b03d
commit 8a388eaf41

View File

@ -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)
}