diff --git a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m index ff1b5e256..d99a1be86 100644 --- a/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m +++ b/Branch-TestBed/Branch-SDK-Tests/BNCServerRequestQueueTests.m @@ -26,6 +26,7 @@ - (id)unarchiveObjectFromData:(NSData *)data; - (NSData *)oldArchiveQueue:(NSArray *)queue; + (NSURL * _Nonnull) URLForQueueFile; +- (void)retrieve; @end @@ -173,11 +174,12 @@ - (void)testMultipleRequests { decodedQueue = [_queue unarchiveQueueFromData:data]; } XCTAssert([decodedQueue count] == 2); - - [_queue remove:eventObject]; - [_queue remove:openObject]; - [_queue persistImmediately]; - // Request Queue is empty. So there should not be any queue file on disk. + [_queue clearQueue]; + XCTAssert([_queue queueDepth] == 0); + [_queue retrieve]; + XCTAssert([_queue queueDepth] == 2); + + // Request are loaded. So there should not be any queue file on disk. XCTAssert([NSFileManager.defaultManager fileExistsAtPath:[[BNCServerRequestQueue URLForQueueFile] path]] == NO); }