integreat-cms icon indicating copy to clipboard operation
integreat-cms copied to clipboard

Add tests for poicategory

Open JoeyStk opened this issue 11 months ago • 5 comments

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


Pull Request Review Guidelines

JoeyStk avatar Mar 30 '24 21:03 JoeyStk

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.

codeclimate[bot] avatar Mar 30 '24 21:03 codeclimate[bot]

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 avatar Apr 01 '24 07:04 MizukiTemma

@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

JoeyStk avatar Apr 07 '24 13:04 JoeyStk

@MizukiTemma This PR is ready for review again :)

JoeyStk avatar Apr 08 '24 12:04 JoeyStk

@MizukiTemma I updated the branch now. Please check if the changes already do everything you had in mind :)

JoeyStk avatar Apr 09 '24 08:04 JoeyStk