Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
danthorpe committed May 4, 2024
1 parent eaf0ac5 commit 372c56e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Tests/ComposableLoadableXCTests/LoadableStateTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class LoadableStateTests: XCTest {
XCTAssertFalse(state.isPending)
XCTAssertFalse(state.isFailure)
XCTAssertFalse(state.isSuccess)
XCTAssertEqual(state.request == EmptyLoadRequest())
XCTAssertEqual(state.request, EmptyLoadRequest())
}

func test__isLoadedSuccess() {
Expand All @@ -31,18 +31,18 @@ final class LoadableStateTests: XCTest {
XCTAssertFalse(state.isActive)
XCTAssertFalse(state.isPending)
XCTAssertFalse(state.isFailure)
XCTAssertEqual(state.request == EmptyLoadRequest())
XCTAssertEqual(state.wrappedValue == TestState(value: 100))
XCTAssertEqual(state.request, EmptyLoadRequest())
XCTAssertEqual(state.wrappedValue, TestState(value: 100))
}

func test__isLoadedFailure() {
var state = LoadableState<EmptyLoadRequest, TestState>(current: .active, previous: .pending)
state.finish(EmptyLoadRequest(), result: .failure(TestEquatableError()))
state.finish(EmptyLoadRequest(), result: .failure(EquatableErrorA()))
XCTAssertTrue(state.isFailure)
XCTAssertFalse(state.isSuccess)
XCTAssertFalse(state.isActive)
XCTAssertFalse(state.isPending)
XCTAssertEqual(state.request == EmptyLoadRequest())
XCTAssertEqual(state.request, EmptyLoadRequest())
}

func test__setLoadedValueToNil() {
Expand Down Expand Up @@ -78,16 +78,16 @@ final class LoadableStateTests: XCTest {
XCTAssertNil(state.isPending)
XCTAssertNil(state.isFailure)
XCTAssertNil(state.isSuccess)
XCTAssertEqual(state.request == EmptyLoadRequest())
XCTAssertEqual(state.request, EmptyLoadRequest())

state.wrappedValue = TestState(value: 100)
XCTAssertTrue(state.isSuccess)
XCTAssertNil(state.isActive)
XCTAssertNil(state.isPending)
XCTAssertNil(state.isFailure)
XCTAssertEqual(state.request == EmptyLoadRequest())
XCTAssertEqual(state.wrappedValue == TestState(value: 100))
XCTAssertEqual(state.request, EmptyLoadRequest())
XCTAssertEqual(state.wrappedValue, TestState(value: 100))

XCTAssertEqual(state.value == 100)
XCTAssertEqual(state.value, 100)
}
}

0 comments on commit 372c56e

Please sign in to comment.