Skip to content

Commit

Permalink
Fixes Failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
DeluxeAlonso committed Jul 24, 2024
1 parent 97eab87 commit 53fc110
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ final class ProfileViewModelTests: XCTestCase {

func testGetAccountDetailSuccessInfoReloaded() {
// Arrange
let currentUser = MockUserProtocol()
currentUser.hasUpdatedInfoResult = true
viewModelToTest = ProfileViewModel(userAccount: currentUser,
interactor: mockInteractor,
factory: mockFactory)

let userToTest = MockUserProtocol(name: "Alonso")
let expectation = XCTestExpectation(description: "Reload account info")
// Act
Expand Down
2 changes: 1 addition & 1 deletion UpcomingMoviesTests/Helpers/Mocks/MockUserProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class MockUserProtocol: UserProtocol {
var avatarImageURL: URL?

var hasUpdatedInfoResult: Bool = false
func hasUpdatedInfo(_ newUserInfo: UpcomingMovies.UserProtocol) -> Bool { hasUpdatedInfoResult }
func hasUpdatedInfo(_ newUserInfo: UserProtocol) -> Bool { hasUpdatedInfoResult }

init(id: Int = 12345,
name: String = "",
Expand Down

0 comments on commit 53fc110

Please sign in to comment.