Skip to content

Commit

Permalink
Fix unit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pixlwave committed Dec 18, 2024
1 parent 577c491 commit 9ec310e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions UnitTests/Sources/TimelineMediaPreviewViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class TimelineMediaPreviewViewModelTests: XCTestCase {
XCTAssertEqual(viewModel.state.currentItem.contentType, "JPEG image")

// When choosing to save the image.
let item = context.viewState.currentItem
let deferred = deferFulfillment(context.$viewState) { $0.bindings.alertInfo != nil }
context.send(viewAction: .saveCurrentItem)
try await deferred.fulfill()
Expand Down Expand Up @@ -164,7 +163,7 @@ class TimelineMediaPreviewViewModelTests: XCTestCase {

private func loadInitialItem() async throws {
let deferred = deferFulfillment(viewModel.state.fileLoadedPublisher) { _ in true }
context.send(viewAction: .updateCurrentItem(context.viewState.previewItems[0]))
context.send(viewAction: .updateCurrentItem(context.viewState.previewItems[context.viewState.initialItemIndex]))
try await deferred.fulfill()
}

Expand Down

0 comments on commit 9ec310e

Please sign in to comment.