mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
Fix alert presentation
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//
|
||||
//
|
||||
// Copyright 2023 New Vector Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@@ -104,18 +104,11 @@ final class PollHistoryViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testAfterFailureCompletionIsCalled() throws {
|
||||
let expectation = expectation(description: #function)
|
||||
|
||||
pollHistoryService.nextBatchPublishers = [MockPollPublisher.failure]
|
||||
viewModel.completion = { event in
|
||||
XCTAssertEqual(event, .genericError)
|
||||
expectation.fulfill()
|
||||
}
|
||||
viewModel.process(viewAction: .viewAppeared)
|
||||
XCTAssertFalse(viewModel.state.isLoading)
|
||||
XCTAssertNotNil(viewModel.state.polls)
|
||||
|
||||
wait(for: [expectation], timeout: 1.0)
|
||||
XCTAssertNotNil(viewModel.state.bindings.alertInfo)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user