Skip to content

Commit 87fa0ae

Browse files
SupenByszclaude
andcommitted
fix(test): Fix lint issues in project API tests
- Remove useless assertions: len(projects) >= 0 is always true - Remove unnecessary type conversion: apiProject.RepoID is already int64 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent c8203ae commit 87fa0ae

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/integration/api_repo_project_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ func TestAPIListProjects(t *testing.T) {
3535

3636
var projects []*api.Project
3737
DecodeJSON(t, resp, &projects)
38-
assert.GreaterOrEqual(t, len(projects), 0)
3938

4039
// Test state filter - open
4140
req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/projects?state=open", owner.Name, repo.Name).
@@ -51,7 +50,6 @@ func TestAPIListProjects(t *testing.T) {
5150
AddTokenAuth(token)
5251
resp = MakeRequest(t, req, http.StatusOK)
5352
DecodeJSON(t, resp, &projects)
54-
assert.GreaterOrEqual(t, len(projects), 0)
5553

5654
// Test pagination
5755
req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/projects?page=1&limit=5", owner.Name, repo.Name).
@@ -90,7 +88,7 @@ func TestAPIGetProject(t *testing.T) {
9088
DecodeJSON(t, resp, &apiProject)
9189
assert.Equal(t, project.Title, apiProject.Title)
9290
assert.Equal(t, project.ID, apiProject.ID)
93-
assert.Equal(t, repo.ID, int64(apiProject.RepoID))
91+
assert.Equal(t, repo.ID, apiProject.RepoID)
9492
assert.NotEmpty(t, apiProject.URL)
9593

9694
// Test getting non-existent project

0 commit comments

Comments
 (0)