From 80693cc39e2a89366eaea8606adf4cd1a26816c2 Mon Sep 17 00:00:00 2001 From: Brandon Williams Date: Tue, 21 Jan 2020 07:58:24 -0500 Subject: [PATCH] Hang on to the cancellable. --- .../PrimeTime/CounterTests/CounterTests.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/0083-testable-state-management-effects/PrimeTime/CounterTests/CounterTests.swift b/0083-testable-state-management-effects/PrimeTime/CounterTests/CounterTests.swift index 9b52b71b..5fdd7bef 100644 --- a/0083-testable-state-management-effects/PrimeTime/CounterTests/CounterTests.swift +++ b/0083-testable-state-management-effects/PrimeTime/CounterTests/CounterTests.swift @@ -74,7 +74,7 @@ class CounterTests: XCTestCase { var nextAction: CounterViewAction! let receivedCompletion = self.expectation(description: "receivedCompletion") - effects[0].sink( + let cancellable = effects[0].sink( receiveCompletion: { _ in receivedCompletion.fulfill() }, @@ -138,7 +138,7 @@ class CounterTests: XCTestCase { var nextAction: CounterViewAction! let receivedCompletion = self.expectation(description: "receivedCompletion") - effects[0].sink( + let cancellable = effects[0].sink( receiveCompletion: { _ in receivedCompletion.fulfill() },