Skip to content

Commit 796513f

Browse files
committed
Update tests
1 parent 0ad6d79 commit 796513f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Tests/SentryTests/Networking/SentryHttpTransportTests.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,11 @@ class SentryHttpTransportTests: XCTestCase {
496496
let sessionRequest = try! SentryURLRequestFactory.envelopeRequest(with: SentryHttpTransportTests.dsn(), data: sessionData)
497497

498498
if fixture.requestManager.requests.invocations.count > 3 {
499-
XCTAssertEqual(sessionRequest.httpBody, try XCTUnwrap(fixture.requestManager.requests.invocations.element(at: 3)).httpBody, "Envelope with only session item should be sent.")
499+
let unzippedBody = try XCTUnwrap(sentry_unzippedData(XCTUnwrap(sessionRequest.httpBody)))
500+
let requestUnzippedBody = try XCTUnwrap(sentry_unzippedData(XCTUnwrap(XCTUnwrap(fixture.requestManager.requests.invocations.element(at: 3)).httpBody)))
501+
let actualEnvelope = try XCTUnwrap(SentrySerialization.envelope(with: unzippedBody))
502+
let expectedEnvelope = try XCTUnwrap(SentrySerialization.envelope(with: requestUnzippedBody))
503+
try EnvelopeUtils.assertEnvelope(expected: expectedEnvelope, actual: actualEnvelope)
500504
} else {
501505
XCTFail("Expected a fourth invocation")
502506
}

0 commit comments

Comments
 (0)