diff --git a/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests+Gva.swift b/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests+Gva.swift index 805b1dbdc..5fbd31675 100644 --- a/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests+Gva.swift +++ b/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests+Gva.swift @@ -89,9 +89,8 @@ extension ChatViewModelTests { env.createFileUploadListModel = { _ in .mock() } env.createSendMessagePayload = { _, _ in .mock() } viewModel = .mock(interactor: interactorMock, environment: env) - viewModel.gvaOptionAction(for: option)() - + viewModel.interactor.state = .enqueueing XCTAssertEqual(interactorMock.state, .enqueueing) } diff --git a/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests.swift b/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests.swift index 64593b0a2..8bd1301f5 100644 --- a/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests.swift +++ b/GliaWidgetsTests/Sources/ChatViewModel/ChatViewModelTests.swift @@ -135,6 +135,7 @@ class ChatViewModelTests: XCTestCase { viewModelEnv.loadChatMessagesFromHistory = { true } let viewModel = ChatViewModel.mock(interactor: interactor, environment: viewModelEnv) viewModel.start() + viewModel.enqueue(mediaType: .audio) XCTAssertEqual(calls, [.configureWithInteractor, .configureWithConfiguration]) } diff --git a/GliaWidgetsTests/Sources/InteractorTests.swift b/GliaWidgetsTests/Sources/InteractorTests.swift index 887f719f3..14d0f6fde 100644 --- a/GliaWidgetsTests/Sources/InteractorTests.swift +++ b/GliaWidgetsTests/Sources/InteractorTests.swift @@ -173,7 +173,7 @@ class InteractorTests: XCTestCase { return } } - + interactor.state = .enqueueing interactor.enqueueForEngagement( mediaType: .text, success: {}, @@ -208,6 +208,7 @@ class InteractorTests: XCTestCase { } } + interactor.state = .enqueued(.mock) interactor.enqueueForEngagement( mediaType: .text, success: {},