Add unit test coverage for updated project‐owner and repo update logic (SZ-46)
rk@tigase.net opened 2 weeks ago

I just fixed a defect in the service layer correctly support updating a project's owner and linked Git repository. Due to lack of time, I am deferring augmenting test coverage to cover this code change.

What changed

The ProjectServiceImpl.updateProject() method was enhanced so that it now:

  • updates the owner when a new ownerId is provided,
  • updates the Git repository when a new gitRepoId is provided,
  • still preserves existing values when the update payload intentionally omits them.

This behavior is important for the UI, which allows project owners and project managers to modify both fields.

What needs to be done

Add focused unit tests that verify:

  1. Updating a project with a new owner correctly persists the new association.
  2. Updating a project with a new Git repository link persists the new repo.
  3. Omitting ownerId and/or gitRepoId leaves the existing associations unchanged.
  4. Attempting to update with a non-existent owner or repo results in the expected error from the service layer.

These tests should exercise only the service layer. Controller-level behavior is already covered elsewhere.

Priority

Low. The logic is working correctly and is safe for the UI, but tests should be added to avoid regressions later.

issue 1 of 1
Type
Task
Priority
Normal
Assignee
Version
1.0
Sprints
n/a
Customer
n/a
Issue Votes (0)
Watchers (3)
Reference
SZ-46
Please wait...
Page is in error, reload to recover