Skip to content

Commit

Permalink
Merge pull request #746 from ably/add-RTE6a-test
Browse files Browse the repository at this point in the history
Add test for RTE6a
  • Loading branch information
funkyboy authored Jul 25, 2018
2 parents c46aeaf + 2e9a004 commit 203fd63
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Spec/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,24 @@ class Utilities: QuickSpec {
}
}
}

context("set of listeners") {

// RTE6a
it("should not change over the course of the emit") {
var firstCallbackCalled = false;
var secondCallbackCalled = false;
eventEmitter.on("a", callback: { _ in
firstCallbackCalled = true
eventEmitter.on("b", callback: { _ in
secondCallbackCalled = true
})
})
eventEmitter.emit("a", with: "123" as AnyObject?)
expect(firstCallbackCalled).to(beTrue())
expect(secondCallbackCalled).to(beFalse())
}
}
}

context("Logger") {
Expand Down

0 comments on commit 203fd63

Please sign in to comment.