Skip to content

Improve unit tests and integration tests to prevent false positives.  #46

Open
@levibostian

Description

@levibostian

As discussed in this issue comment, there has been a small number of false positives that have been discovered in the Teller tests.

What is the problem: There is the potential of bugs existing in Teller (such as this issue) that are not being caught by the tests.

The issue being used as an example needs to have integration tests to cover it. A unit test will not test this properly.

How do we solve this?: The current tests for OnlineRepository are not integration tests. They are more of unit tests (as they are highly mocked). The functions themselves are testing the correct use cases. However, because we are mocking all of it's dependencies, the OnlineRepository is not being tested property from an integration standpoint.

I propose the following changes:

  • Improve Repository tests to make it more of an integration test Take the existing Repository and PagingRepository tests, remove mocked dependencies (except the ones that fetch from a network) and use real dependencies to have an integration test environment setup for it.

  • Create a new test file for OnlineRepository that can be for unit testing the functions of OnlineRepository (if we find it necessary to test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementWould make an improvement in some way but is not a requirement such as a bug would be.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions