Skip to content

Commit

Permalink
Fix test after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunn committed Feb 21, 2024
1 parent 1be1a4d commit 6bd5bae
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,23 +107,19 @@ final class DataBrokerProtectionUpdaterTests: XCTestCase {
}
}

<<<<<<< HEAD
func testWhenSavedBrokerIsOnAnOldVersion_thenWeUpdateIt() {
if let vault = self.vault {
let sut = DataBrokerProtectionBrokerUpdater(repository: repository, resources: resources, vault: vault)
repository.lastCheckedVersion = nil
resources.brokersList = [.init(id: 1, name: "Broker", steps: [Step](), version: "1.0.1", schedulingConfig: .mock)]
=======
func testWhen24PassedSinceLastRunDate_thenWeTryToUpdateBrokers() {
if let vault = self.vault {
let sut = DataBrokerProtectionBrokerUpdater(repository: repository, resources: resources, vault: vault)
repository.lastRunDate = substract(hours: 25, to: Date())
resources.brokersList = [.init(id: 1, name: "Broker", url: "broker.com", steps: [Step](), version: "1.0.1", schedulingConfig: .mock)]
vault.shouldReturnOldVersionBroker = true

sut.checkForUpdatesInBrokerJSONFiles()

XCTAssertTrue(repository.wasSaveLastRunDateCalled)
XCTAssertTrue(repository.wasSaveLatestAppVersionCheckCalled)
XCTAssertTrue(resources.wasFetchBrokerFromResourcesFilesCalled)
XCTAssertTrue(vault.wasBrokerUpdateCalled)
XCTAssertFalse(vault.wasBrokerSavedCalled)
} else {
XCTFail("Mock vault issue")
}
Expand Down

0 comments on commit 6bd5bae

Please sign in to comment.