♻️ :: Adapt tests

This commit is contained in:
Felix Mau
2022-08-15 21:33:58 +02:00
parent fa7e30c44f
commit 0bfd932196
@@ -103,9 +103,12 @@ final class GradientActivityIndicatorViewModelTestCase: XCTestCase {
}
receivedIsAnimating.removeAll()
let size = CGSize(width: .random(in: 1 ... 100), height: .random(in: 1 ... 100))
let bounds = CGRect(origin: .zero, size: size)
// When
withExtendedLifetime(disposable) {
viewModel.bounds = CGRect(origin: .zero, size: .zero)
viewModel.bounds = bounds
}
// Then
@@ -120,6 +123,9 @@ final class GradientActivityIndicatorViewModelTestCase: XCTestCase {
receivedIsAnimating.append(isAnimating)
}
let size = CGSize(width: .random(in: 1 ... 100), height: .random(in: 1 ... 100))
let bounds = CGRect(origin: .zero, size: size)
viewModel.isHidden = true
receivedIsAnimating.removeAll()