From 894acaeb0a1065f01a12a3a9cfaf53b61e36f789 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sun, 20 Apr 2025 21:20:43 -0700 Subject: [PATCH] =?UTF-8?q?Delete=20some=20tests=20that=20don=E2=80=99t=20?= =?UTF-8?q?belong=20in=20Feedly=20tests.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Feedly/FeedlyOperationTests.swift | 93 ------------------- 1 file changed, 93 deletions(-) diff --git a/Account/Tests/AccountTests/Feedly/FeedlyOperationTests.swift b/Account/Tests/AccountTests/Feedly/FeedlyOperationTests.swift index 7492baa90..f2cbc0dd9 100644 --- a/Account/Tests/AccountTests/Feedly/FeedlyOperationTests.swift +++ b/Account/Tests/AccountTests/Feedly/FeedlyOperationTests.swift @@ -135,97 +135,4 @@ class FeedlyOperationTests: XCTestCase { // // waitForExpectations(timeout: 2) } - - func testProgressReporting() { - let progress = DownloadProgress(numberOfTasks: 0) - let didChangeExpectation = expectation(forNotification: .DownloadProgressDidChange, object: progress) - // This number is the number of times breakpoints on calls to DownloadProgress.postDidChangeNotification is hit. - didChangeExpectation.expectedFulfillmentCount = 4 - didChangeExpectation.assertForOverFulfill = true - - let testOperation = TestOperation() - - testOperation.downloadProgress = progress - XCTAssertTrue(progress.numberRemaining == 1) - - testOperation.downloadProgress = nil - XCTAssertTrue(progress.numberRemaining == 0) - - waitForExpectations(timeout: 2) - } - - func testProgressReportingOnCancel() { - let progress = DownloadProgress(numberOfTasks: 0) - let didChangeExpectation = expectation(forNotification: .DownloadProgressDidChange, object: progress) - // This number is the number of times breakpoints on calls to DownloadProgress.postDidChangeNotification is hit. - didChangeExpectation.expectedFulfillmentCount = 4 - didChangeExpectation.assertForOverFulfill = true - - let testOperation = TestOperation() - testOperation.downloadProgress = progress - - let completionExpectation = expectation(description: "Operation Completed") - testOperation.completionBlock = { _ in - completionExpectation.fulfill() - } - - MainThreadOperationQueue.shared.add(testOperation) - - XCTAssertTrue(progress.numberRemaining == 1) - MainThreadOperationQueue.shared.cancelOperations([testOperation]) - XCTAssertTrue(progress.numberRemaining == 0) - - waitForExpectations(timeout: 2) - - XCTAssertTrue(progress.numberRemaining == 0) - } - - func testDoesProgressReportingOnSuccess() { - let progress = DownloadProgress(numberOfTasks: 0) - let didChangeExpectation = expectation(forNotification: .DownloadProgressDidChange, object: progress) - // This number is the number of times breakpoints on calls to DownloadProgress.postDidChangeNotification is hit. - didChangeExpectation.expectedFulfillmentCount = 4 - didChangeExpectation.assertForOverFulfill = true - - let testOperation = TestOperation() - testOperation.downloadProgress = progress - - let completionExpectation = expectation(description: "Operation Completed") - testOperation.completionBlock = { _ in - completionExpectation.fulfill() - } - - MainThreadOperationQueue.shared.add(testOperation) - - XCTAssertTrue(progress.numberRemaining == 1) - - waitForExpectations(timeout: 2) - - XCTAssertTrue(progress.numberRemaining == 0) - } - - func testProgressReportingOnFailure() { - let progress = DownloadProgress(numberOfTasks: 0) - let didChangeExpectation = expectation(forNotification: .DownloadProgressDidChange, object: progress) - // This number is the number of times breakpoints on calls to DownloadProgress.postDidChangeNotification is hit. - didChangeExpectation.expectedFulfillmentCount = 4 - didChangeExpectation.assertForOverFulfill = true - - let testOperation = TestOperation() - testOperation.mockError = TestOperationError.mockError - testOperation.downloadProgress = progress - - let completionExpectation = expectation(description: "Operation Completed") - testOperation.completionBlock = { _ in - completionExpectation.fulfill() - } - - MainThreadOperationQueue.shared.add(testOperation) - - XCTAssertTrue(progress.numberRemaining == 1) - - waitForExpectations(timeout: 2) - - XCTAssertTrue(progress.numberRemaining == 0) - } }