Skip to content

Commit

Permalink
Add: unit test for footer buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSmart00 committed Jun 20, 2024
1 parent 25fc196 commit b26ea10
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions app-ios/Tests/AboutFeatureTests/AboutFeatureTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,35 @@ final class AboutFeatureTests: XCTestCase {
$0.destination = .privacyPolicy
}
}

@MainActor
func testTappedYoutube() async {
let store = TestStore(initialState: AboutReducer.State()) {
AboutReducer()
}
await store.send(\.view.youtubeTapped) {
$0.destination = .youtube
}
}

@MainActor
func testTappedXcom() async {
let store = TestStore(initialState: AboutReducer.State()) {
AboutReducer()
}
await store.send(\.view.xcomTapped) {
$0.destination = .xcom
}
}

@MainActor
func testTappedMedium() async {
let store = TestStore(initialState: AboutReducer.State()) {
AboutReducer()
}
await store.send(\.view.mediumTapped) {
$0.destination = .medium
}
}

}

0 comments on commit b26ea10

Please sign in to comment.