diff --git a/Tests/ElixxirDAppsSDKTests/MessageSendReportTests.swift b/Tests/ElixxirDAppsSDKTests/MessageSendReportTests.swift index 6418a5321c4bc2176ebece124d2ccba3c855bf63..52f3364049620ead64fb1c146677c02a66ed8dcb 100644 --- a/Tests/ElixxirDAppsSDKTests/MessageSendReportTests.swift +++ b/Tests/ElixxirDAppsSDKTests/MessageSendReportTests.swift @@ -29,4 +29,18 @@ final class MessageSendReportTests: XCTestCase { XCTAssertNoDifference(decodedReport, report) } + + func testDecodeEmpty() throws { + let jsonString = "{}" + let jsonData = jsonString.data(using: .utf8)! + let decoder = JSONDecoder() + decoder.dataDecodingStrategy = .base64 + let report = try decoder.decode(MessageSendReport.self, from: jsonData) + + XCTAssertNoDifference(report, MessageSendReport( + roundList: nil, + messageId: nil, + timestamp: nil + )) + } }