mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-20 09:11:33 +01:00
* `@preconcurrency @MainActor` isolation of `Store` * Remove unneeded `@MainActor`s * Remove thread checking code * Remove unneeded `@MainActor`s * Swift 5.10 compatibility fixes * wip * More 5.10 fixes * wip * fixes * wip * wip * up the timeout * wip * Fixes * Remove mainActorASAP in favor of mainActorNow. (#3288) * wip * Run swift-format * Update README.md * Fix integration tests. (#3294) * Fix integration tests. * wip * wip * Run swift-format * mainActorNow doesnt need escaping closure * wip * migration guide * wip * Update MigratingTo1.14.md --------- Co-authored-by: Brandon Williams <mbrandonw@hey.com> Co-authored-by: Brandon Williams <135203+mbrandonw@users.noreply.github.com> Co-authored-by: mbrandonw <mbrandonw@users.noreply.github.com>
27 lines
626 B
Swift
27 lines
626 B
Swift
import ComposableArchitecture
|
|
import XCTest
|
|
|
|
@testable import SyncUps
|
|
|
|
class SyncUpDetailTests: XCTestCase {
|
|
func testEdit() async {
|
|
let syncUp = SyncUp(
|
|
id: SyncUp.ID(),
|
|
title: "Point-Free Morning Sync"
|
|
)
|
|
let store = await TestStore(initialState: SyncUpDetail.State(syncUp: Shared(syncUp))) {
|
|
SyncUpDetail()
|
|
}
|
|
|
|
await store.send(.editButtonTapped) {
|
|
$0.destination = .edit(SyncUpForm.State(syncUp: syncUp))
|
|
}
|
|
|
|
var editedSyncUp = syncUp
|
|
editedSyncUp.title = "Point-Free Evening Sync"
|
|
await store.send(\.destination.edit.binding.syncUp, editedSyncUp) {
|
|
|
|
}
|
|
}
|
|
}
|