Created
July 8, 2025 11:26
-
-
Save jacobsapps/d70ebcca10169c2eca5bf1d3614bcae6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
func refreshBeers_tellsRepositoryToLoad() async throws { | |
sut = BeerViewModel(repository: mockBeerRepository) | |
mockBeerRepository.stubLoadBeersResponse = .success([]) | |
let exp = SwiftExpectation() | |
mockBeerRepository.didLoadBeers = { exp.fulfill() } | |
sut.refreshBeers() | |
try await exp.wait() | |
#expect(mockBeerRepository.loadBeersCallCount == 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment