-
Notifications
You must be signed in to change notification settings - Fork 74
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 testErrorDelegateCallbackWhenMismatchInChunkSupport #75
Conversation
@@ -71,9 +72,18 @@ - (void)executeDelegateBlock:(dispatch_block_t)block | |||
{ | |||
SPTDataLoaderRequest *copiedRequest = [request copy]; | |||
id<SPTDataLoaderDelegate> delegate = self.delegate; | |||
|
|||
// Cancel the request immediately if it requires chunks and the delegate does not support that | |||
if ([delegate respondsToSelector:@selector(dataLoaderShouldSupportChunks:)] && copiedRequest.chunks) { |
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.
Shouldn't you now also message the delegate in the if-statement to check if it supports chunks?
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.
Yes you are totally right
Could we add a test for the happy case? |
@rastersize can do |
0c5fde7
to
69811f9
Compare
@rastersize happy case is tested in testRelayReceivedDataChunkToDelegate |
* Test that an error is thrown when the data loader attempts to load a request that requires chunks but the delegate does not support chunks * Removes previous assertion in favor of a less noisy delegate error callback approach
69811f9
to
ca15136
Compare
@8W9aG Oh right, nice. 👍 |
Add testErrorDelegateCallbackWhenMismatchInChunkSupport
attempts to load a request that requires chunks but
the delegate does not support chunks
noisy delegate error callback approach