Does it use the id to check for duplicates? If that is the case then all is good.
All tests pass now
I'm not sure how I would implement this test otherwise, I guess the repository should raise an exception during initialization then.
To test that api.tags() gets called only once regardless of how many calls are made to the repository.
It should be quicker and prevents errors in case some problems with DB clearing happens.
No, filters can be set when this method is called. This method should deliberately ignore filters.
Imagine this:
- Open the app
- Select one tag
- The background sync starts at this…
With update_sources disabled, the api calls to tags and sources is done once to cache the data, and then, the data in the cache is used.
Alright, so I should verify that the call to the api…
I expect the function to behave differently from how it is currently behaving.
Expected behavior: When background sync starts, the last 200 articles for each item type are cached. Thus I…
I don't think sources and tags should be cached if items are not cached; what would be the use of such a function?
Even if the DB is empty, there is no reason to call it if the setting is disabled. I placed something in the DB just to test that it was not called.
Right, I definitely have to define these things within the functions to avoid these kinds of errors.