Files
cleveragents-core/features/database_repository_coverage.feature
T

38 lines
1.7 KiB
Gherkin

Feature: Database Repository Error Handling Coverage
As a developer
I want to ensure database repositories handle edge cases properly
So that missing entities and failed updates are handled gracefully
@phase1
Scenario: ProjectRepository get_by_id returns None for non-existent project
Given I have a project repository with database session
When I query for a project with non-existent ID 99999
Then the repository should return None for missing project
@phase1
Scenario: ProjectRepository update method handles successful project updates
Given I have a project repository with database session
And I have created a project named "test-project"
When I modify the project name to "updated-project"
Then the project should be updated in the database
And the updated_at timestamp should be refreshed
@phase1
Scenario: ProjectRepository update returns unchanged object for non-existent project
Given I have a project repository with database session
When I attempt to update a project that does not exist
Then the update operation should complete without error
And the original project object should be returned unchanged
@phase1
Scenario: PlanRepository get_current_for_project returns None when no current plan exists
Given I have a plan repository with database session
When I query for current plan of non-existent project 99999
Then the repository should return None for missing current plan
@phase1
Scenario: PlanRepository get_by_id returns plan with None build when no build exists
Given I have a plan repository with database session
And I have created a plan without build information
When I retrieve the plan by ID
Then the plan should be returned with null build field