Made StateStoreViewModel state mutable and removed the reducer for all the features using it.

This commit is contained in:
Stefan Ceriu
2022-01-28 12:58:31 +02:00
committed by Stefan Ceriu
parent fc9e95aee8
commit 313b05485a
42 changed files with 324 additions and 431 deletions
@@ -100,12 +100,12 @@ class LocationSharingViewModelTests: XCTestCase {
func testLoading() {
let viewModel = buildViewModel(withLocation: false)
viewModel.dispatch(action: .startLoading)
viewModel.startLoading()
XCTAssertFalse(viewModel.context.viewState.shareButtonEnabled)
XCTAssertTrue(viewModel.context.viewState.showLoadingIndicator)
viewModel.dispatch(action: .stopLoading(nil))
viewModel.stopLoading()
XCTAssertTrue(viewModel.context.viewState.shareButtonEnabled)
XCTAssertFalse(viewModel.context.viewState.showLoadingIndicator)