diff --git a/Sources/Segment/Events.swift b/Sources/Segment/Events.swift index 4d0cc27a..39d8e7e2 100644 --- a/Sources/Segment/Events.swift +++ b/Sources/Segment/Events.swift @@ -205,6 +205,6 @@ extension Analytics { exceptionFailure("Could not parse traits.") } } - process(event: event) + process(incomingEvent: event) } } diff --git a/Tests/Segment-Tests/Analytics_Tests.swift b/Tests/Segment-Tests/Analytics_Tests.swift index ed4d093e..1aa1df8a 100644 --- a/Tests/Segment-Tests/Analytics_Tests.swift +++ b/Tests/Segment-Tests/Analytics_Tests.swift @@ -319,8 +319,8 @@ final class Analytics_Tests: XCTestCase { analytics.track(name: "test") let newBatchCount = analytics.storage.eventFiles(includeUnfinished: true).count - // 1 new temp file, and 1 new finished file. - XCTAssertTrue(newBatchCount == currentBatchCount + 2) + // 1 new temp file + XCTAssertTrue(newBatchCount == currentBatchCount + 1, "New Count (\(newBatchCount)) should be \(currentBatchCount) + 1") } func testVersion() {