Files
pkurchatov 27a3472171 Enabled blankLinesBetweenImports swiftformat rule
commit_hash:84ea24cbdf21ef89741080f38ec5e583172a2458
2024-12-20 12:41:02 +03:00

21 lines
636 B
Swift

import LayoutKit
import VGSL
import XCTest
final class ContainerBlockTests: XCTestCase {
func test_WhenUpdatesState_SendsStatesToChildren() throws {
let state = GalleryViewState(contentOffset: 1, itemsCount: 2)
let states = [GalleryBlockTestModels.path: state]
let block = containerBlock
let updatedBlock = try block.updated(withStates: states)
let updatedGalleryBlock = updatedBlock.children.first?.content as? GalleryBlock
XCTAssertEqual(updatedGalleryBlock?.state, state)
}
}
private let containerBlock = try! ContainerBlock(
layoutDirection: .horizontal,
children: [GalleryBlockTestModels.base]
)