Skip to content

Commit

Permalink
Add test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
srdanrasic committed Aug 19, 2019
1 parent 461b4dd commit 0835092
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Tests/ReactiveKitTests/SignalTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,18 @@ class SignalTests: XCTestCase {
takenLast2.expectComplete(after: [2, 3])
}

func testTakeFirstOne() {
let expect = expectation(description: #function)
let observable = Property(false)

_ = observable.take(first: 1).collect().observeNext { values in
XCTAssertEqual([false], values)
expect.fulfill()
}

waitForExpectations(timeout: 1, handler: nil)
}

func testTakeUntil() {
let bob = Scheduler()
let eve = Scheduler()
Expand Down

0 comments on commit 0835092

Please sign in to comment.