integreat-cms
integreat-cms copied to clipboard
Add tests for poicategory
Short description
This PR adds tests for the poi categories in order to increase our test coverage further and secondly to make sure we catch bugs such as #2708 in the future.
Proposed changes
- Add tests both for creating new poi categories and for the poi category list
Side effects
- I think none?
Resolved issues
Fixes: Partly #2582
Code Climate has analyzed commit 9c40bd5b and detected 0 issues on this pull request.
The test coverage on the diff in this pull request is 100.0% (50% is the threshold).
This pull request will bring the total coverage in the repository to 82.0% (0.0% change).
View more on Code Climate.
It's a nice improvement and catches the error reported in #2708 :+1:
I'd suggest to add tests for updating a POI category (adding a new translation to an existing category and/or changing a translation of an existing one) and deletion (used categories will not be deleted, but unused ones can be).
@MizukiTemma thank you for your feedback. I implemented the three requested tests (updating, successful deletion of poicategory not in use, unsuccessful deletion of poicategory in use). The last one detected a bug (#2733). Therefore this PR is blocked and has a failing test until the issue is resolved
@MizukiTemma This PR is ready for review again :)
@MizukiTemma I updated the branch now. Please check if the changes already do everything you had in mind :)