Skip to content

Commit 5ad2c20

Browse files
test: Check that the folder results contains the random folder
1 parent 8b39b95 commit 5ad2c20

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

MailTests/Folders/ITFolderListViewModel.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -345,11 +345,11 @@ final class ITFolderListViewModelWorker: XCTestCase {
345345

346346
// THEN
347347
XCTAssertGreaterThanOrEqual(allFolders.count, 1, "There should be at least one match")
348-
guard let matchingFolder = allFolders.first else {
349-
XCTFail("Unexpected")
350-
return
351-
}
352-
XCTAssertEqual(matchingFolder.frozenContent.localizedName, randomFolder.localizedName, "We expect the names to match")
348+
349+
XCTAssertTrue(
350+
allFolders.contains { $0.frozenContent.id == randomFolder.id },
351+
"We expect the results to contain the folder"
352+
)
353353
}
354354

355355
func testFilterAndSortFolders_SearchNoMatch() async throws {

0 commit comments

Comments
 (0)