Skip to content

Commit

Permalink
feat: add test for coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
FemiNoviaLina committed Apr 16, 2024
1 parent e483bcb commit c4f32ff
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/store/postgres/action_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,14 @@ func (s *ActionRepositoryTestSuite) TestUpdate() {
Description: "should return error if action id is empty",
ErrString: "action id is invalid",
},
{
Description: "should return error if action name is empty",
ActionToUpdate: action.Action{
ID: "action2",
Name: "",
},
ErrString: action.ErrInvalidDetail.Error(),
},
}

for _, tc := range testCases {
Expand Down
11 changes: 11 additions & 0 deletions internal/store/postgres/project_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,17 @@ func (s *ProjectRepositoryTestSuite) TestUpdateBySlug() {
Description: "should return error if project slug is empty",
ErrString: project.ErrInvalidID.Error(),
},
{
Description: "should return error if project name is empty",
ProjectToUpdate: project.Project{
Slug: "project-1",
Name: "",
Organization: organization.Organization{
ID: s.orgs[0].ID,
},
},
ErrString: project.ErrInvalidDetail.Error(),
},
}

for _, tc := range testCases {
Expand Down

0 comments on commit c4f32ff

Please sign in to comment.