Expose network state to iOS bridge
This commit is contained in:
@@ -57,6 +57,14 @@ struct Smoke {
|
||||
require(chats.count == 1, "expected one fake chat")
|
||||
let chat = chats[0]
|
||||
|
||||
let network = session.networkState()
|
||||
require({
|
||||
if case .ready = network {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}(), "expected ready network state")
|
||||
|
||||
let history = try session.loadHistory(chatId: chat.id, limit: 20)
|
||||
require(history.first?.text == "Hello from fake TDLib", "expected seeded history")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user