Skip to content

Instantly share code, notes, and snippets.

@atimca
Created July 8, 2020 16:22
Show Gist options
  • Save atimca/6619e4ee85ab41842b391e9d976afa60 to your computer and use it in GitHub Desktop.
Save atimca/6619e4ee85ab41842b391e9d976afa60 to your computer and use it in GitHub Desktop.
func testAfterDataLoadedEventStateWillBeChangedIntoLoadedWithReceivedData() {
// Given
let initialState: State = .initial
let data = ["first", "second"]
// When
let resultState = State.reduce(state: initialState, event: .dataLoaded(data: data))
// Then
XCTAssertEqual(resultState, .loaded(data: data))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment