Commit Graph

3 Commits

Author SHA1 Message Date
Gustavo Henrique Santos Souza de Miranda 0227879bb3 test(entry_service): add a failure case test for create method
This commit adds a unit test for an important "unhappy path" in the
EntryService's `create` method.

It specifically verifies that the method gracefully returns `None`
when provided with a `travel_diary_id` that does not exist in the
database, ensuring the initial guard clause works as expected.
2025-07-20 23:13:45 -03:00
Gustavo Henrique Santos Souza de Miranda e46f02cc39 test(entry_service): add unit test for creating a new entry
This commit introduces the first unit test for the EntryService,
covering the "happy path" for the `create` method.

It verifies that a new entry is correctly persisted to the database,
including its relationship with associated Photo objects. The test
leverages fixtures to create an isolated, in-memory database
populated with the necessary dependencies.
2025-07-20 23:13:45 -03:00
Gustavo Henrique Santos Souza de Miranda 88a0b9cf80 Refactor to add conftest.py to share fixtures 2025-07-20 23:07:04 -03:00