File tree Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Expand file tree Collapse file tree 1 file changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -194,22 +194,21 @@ class InboxTests: XCTestCase {
194
194
mockInAppFetcher. mockInAppPayloadFromServer ( internalApi: internalAPI, payload) . onSuccess { _ in
195
195
let messages = internalAPI. inAppManager. getInboxMessages ( )
196
196
XCTAssertEqual ( messages. count, 2 )
197
-
197
+
198
198
let messageToRemove = messages [ 0 ]
199
199
internalAPI. inAppManager. remove (
200
200
message: messageToRemove,
201
201
location: . inbox,
202
202
source: . inboxSwipe,
203
- successHandler: { _ in
204
- // Success handler code
205
- expectation1. fulfill ( )
206
- } ,
207
- failureHandler: { _, _ in
208
- // Failure handler code
209
- XCTFail ( " Failed to remove message " )
210
- expectation1. fulfill ( )
211
- }
203
+ successHandler: { _ in } ,
204
+ failureHandler: { _, _ in }
212
205
)
206
+
207
+ DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.05 ) {
208
+ let newMessages = internalAPI. inAppManager. getInboxMessages ( )
209
+ XCTAssertEqual ( newMessages. count, 1 )
210
+ expectation1. fulfill ( )
211
+ }
213
212
}
214
213
215
214
wait ( for: [ expectation1] , timeout: testExpectationTimeout)
You can’t perform that action at this time.
0 commit comments