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
Add test for when JSONResponseParsingError.noResponseToParse is called #2903
Add test for when JSONResponseParsingError.noResponseToParse is called #2903
Conversation
…rror.noResponseToParse is called
👷 Deploy request for apollo-ios-docs pending review.Visit the deploys page to approve it
|
Thanks for the PR @tokizuoh. You mentioned "unintended call", did you encounter this in general operation of the interceptor chain? |
Thank you for replying @calvincestari ! No, I did not encounter it during the general operation of the interceptor chain. I only added it because there was no test code for the defined error. I have not actually encountered it in practice. |
We now have the Would you like to do that, I'm happy to take it on if not. |
…rror.noResponseToParse is called
…ParsingError.noResponseToParse is called" This reverts commit 3de56438e3c5e1e34577ee3aad158932a1638d56.
…son-response-parsing-error-no-response-to-parse
for testJSONResponseParsingInterceptorFailsWithImproperlyOrderedCalls()
MockInterceptorProvider class is good! I tried to use it. |
I would like to update other tests with another Pull-Request if 043459b's policy looks good.
|
Yes that's what I meant; cleaning up this whole test file. You can do it all in this PR, I don't think we need another one. |
for testJSONResponseParsingInterceptorFailsWithEmptyData()
OK! I agree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed the new test but looks good otherwise. I'll get this merged now, thanks for the contribution @tokizuoh.
Tests/ApolloTests/Interceptors/JSONResponseParsingInterceptorTests.swift
Show resolved
Hide resolved
The renaming makes it easier to understand. Thank you! |
Add test where an unintended call to the JSONResponseParsingInterceptor is made and verify that the error is
.noResponseToParse
in the completion handler.