mirror of
https://github.com/divkit/divkit.git
synced 2026-06-06 20:07:59 +00:00
0663870bf9
commit_hash:52ce6e4a9f35a44ddef28565cec76ddaabdc2d08
14 lines
435 B
Swift
14 lines
435 B
Swift
import Foundation
|
|
@testable import LayoutKit
|
|
import XCTest
|
|
|
|
final class TabContentsViewModelTests: XCTestCase {
|
|
func test_WhenCreatingFromEmptyTabs_ThrowsMissingChildrenError() {
|
|
XCTAssertThrowsError(try makeMe(pages: []), BlockError("Tab error: no children provided"))
|
|
}
|
|
|
|
private func makeMe(pages: [TabPageViewModel]) throws -> TabContentsViewModel {
|
|
try TabContentsViewModel(pages: pages, pagesHeight: .default)
|
|
}
|
|
}
|