mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-20 09:11:33 +01:00
Update docs/examples to leverage TestStore.send(\.path) (#2868)
This commit is contained in:
@@ -46,7 +46,7 @@ final class SyncUpDetailTests: XCTestCase {
|
||||
$0.speechClient.authorizationStatus = { .denied }
|
||||
}
|
||||
|
||||
await store.send(.destination(.presented(.alert(.openSettings)))) {
|
||||
await store.send(\.destination.alert.openSettings) {
|
||||
$0.destination = nil
|
||||
}
|
||||
XCTAssertEqual(settingsOpened.value, true)
|
||||
@@ -64,7 +64,7 @@ final class SyncUpDetailTests: XCTestCase {
|
||||
$0.speechClient.authorizationStatus = { .denied }
|
||||
}
|
||||
|
||||
await store.send(.destination(.presented(.alert(.continueWithoutRecording)))) {
|
||||
await store.send(\.destination.alert.continueWithoutRecording) {
|
||||
$0.destination = nil
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ final class SyncUpDetailTests: XCTestCase {
|
||||
}
|
||||
|
||||
syncUp.title = "Blob's Meeting"
|
||||
await store.send(.destination(.presented(.edit(.set(\.syncUp, syncUp))))) {
|
||||
await store.send(\.destination.edit.syncUp, syncUp) {
|
||||
$0.$destination[case: \.edit]?.syncUp.title = "Blob's Meeting"
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ final class SyncUpDetailTests: XCTestCase {
|
||||
await store.send(.deleteButtonTapped) {
|
||||
$0.destination = .alert(.deleteSyncUp)
|
||||
}
|
||||
await store.send(.destination(.presented(.alert(.confirmDeletion)))) {
|
||||
await store.send(\.destination.alert.confirmDeletion) {
|
||||
$0.destination = nil
|
||||
}
|
||||
await store.receive(\.delegate.deleteSyncUp)
|
||||
|
||||
Reference in New Issue
Block a user