Private Issues: Unit tests for code ⇔ DB boundary #330

Closed
opened 2025-12-16 10:11:44 +00:00 by nphilipp · 1 comment
Member

Story

As a Forgejo upstream maintainer,
I want that storage and retrieval of private issues in the database is tested thoroughly,
so I can sleep better at night.

Acceptance Criteria

Tests exist which verify that …

  • ­… public and private issues can only be stored through their respective types (Issue and PrivateIssue) into their respective tables (issue and private_issue), when inserting and updating entries.
  • … public and private issues loaded from their respective tables have IsPrivate set appropriately.

Background

https://codeberg.org/forgejo/design/issues/2#issuecomment-8405379

# Story As a Forgejo upstream maintainer, I want that storage and retrieval of private issues in the database is tested thoroughly, so I can sleep better at night. # Acceptance Criteria Tests exist which verify that … - [x] ­… public and private issues can only be stored through their respective types (`Issue` and `PrivateIssue`) into their respective tables (`issue` and `private_issue`), when inserting and updating entries. - [x] … public and private issues loaded from their respective tables have `IsPrivate` set appropriately. # Background https://codeberg.org/forgejo/design/issues/2#issuecomment-8405379
nphilipp added this to the Backlog project 2025-12-16 10:11:44 +00:00
nphilipp modified the project from Backlog to Sprint 15 2026-02-23 10:52:10 +00:00
Author
Member

Fixed in my feature branch as “Validate event hooks for saving issues into the DB” and “Validate event hooks for loading issues from DB”.

Fixed in [my feature branch](https://codeberg.org/nilsph/forgejo/src/branch/forgejo--private-issues) as “Validate event hooks for saving issues into the DB” and “Validate event hooks for loading issues from DB”.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
forge/forge#330
No description provided.