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

Fix failing tests #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix failing tests #1

wants to merge 4 commits into from

Conversation

naoufalmed
Copy link

This PR fixes the following:

  • Missing dependency in the test target.
  • Inter-dependet test cases, where some test cases would fail if ran individually.
  • Add missing test cases for file download (I'm not sure if they were really missing, or removed on purpose)

- Test cases were passing when ran together, but they fail when ran individually. This has been fixed by making `urlSession` lazy.
- The test case: `testProtocolReturnsErrorWithRegisteredStubError` had an ambiguous assertion on error. The test would pass even if other error than expected happened. This has been fixed by adding an assertion on the error domain.
- Test cases were passing when ran together, but they fail when ran individually. This was the case of test cases `testEphemeralSessionConfigurationIncludesProtocol` and `testDefaultSessionConfigurationIncludesProtocol`. Their failure was caused by the `MockingjayProtocol` not being added to `URLProtocol`'s registered classes. The registration happens normally when calling the `stub(_:_:)` method. As these two test cases didn't call it, they only pass if they run after other tests where `stub(_:_:)` was called.
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

Successfully merging this pull request may close these issues.

1 participant