Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock + Chained requests #20

Open
Gagauz2010 opened this issue Nov 29, 2024 · 0 comments
Open

Mock + Chained requests #20

Gagauz2010 opened this issue Nov 29, 2024 · 0 comments

Comments

@Gagauz2010
Copy link

Режим мока запросов в сочетании с chained requests не работает как предполагалось.

Например:

Api.users.all()
    .and(Api.bills.all())
    .onError { error in
        // some error handling
    }
    .onSuccess { users , bills in
        // handle all data
    }

Выполнение кода не заходит ни в один из блоков, ни в onError, ни в onSuccess. При этом в структуру отвечающую за мок отладчик заходит

struct Mock: MockResponder {
    static func proceed(_ request: MockRequest, completion: @escaping (MyStruct?, NetworkError?) -> Void) throws {
        try completion(somedata, nil)
    }
}

Используемая версия: 1.15.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant