Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
stephtelolahy committed Jan 2, 2025
1 parent 0d557aa commit 1ce85d2
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions WildWestOnline/Utilities/Redux/Tests/StoreTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import Testing
struct StoreTest {
@Test func dispatchActionShouldEmitNewState() async throws {
// Given
var service = SearchService()
service.fetchRecentResult = .success(["recent"])
let service = SearchService(
searchResult: .success(["result"]),
fetchRecentResult: .success(["recent"])
)
let store = await AppStore(
initialState: .init(),
reducer: appReducer,
Expand Down Expand Up @@ -80,8 +82,8 @@ func appReducer(
}

struct SearchService {
var searchResult: Result<[String], Error> = .success([])
var fetchRecentResult: Result<[String], Error> = .success([])
let searchResult: Result<[String], Error>
let fetchRecentResult: Result<[String], Error>

func search(query: String) async throws -> [String] {
switch searchResult {
Expand Down

0 comments on commit 1ce85d2

Please sign in to comment.