This commit adds a unit test to ensure that the EntryService's
`create` method correctly handles cases where an empty list of photos
is provided.
It verifies that the entry is created successfully and that the
`photos` relationship is an empty list, confirming the feature's
flexibility.
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.
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.
This commit adds a unit test to ensure that the EntryService's
`create` method correctly handles cases where an empty list of photos
is provided.
It verifies that the entry is created successfully and that the
`photos` relationship is an empty list, confirming the feature's
flexibility.
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.
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.