Skip to content

Commit 71a5284

Browse files
committed
Fix test
1 parent 3321f7e commit 71a5284

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

integrations/api_repo_teams_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import (
1010
"testing"
1111

1212
"code.gitea.io/gitea/models"
13+
"code.gitea.io/gitea/models/unit"
1314
"code.gitea.io/gitea/models/unittest"
1415
user_model "code.gitea.io/gitea/models/user"
1516
api "code.gitea.io/gitea/modules/structs"
17+
"code.gitea.io/gitea/modules/util"
1618

1719
"github.com/stretchr/testify/assert"
1820
)
@@ -36,7 +38,7 @@ func TestAPIRepoTeams(t *testing.T) {
3638
if assert.Len(t, teams, 2) {
3739
assert.EqualValues(t, "Owners", teams[0].Name)
3840
assert.False(t, teams[0].CanCreateOrgRepo)
39-
assert.EqualValues(t, []string{"repo.code", "repo.issues", "repo.pulls", "repo.releases", "repo.wiki", "repo.ext_wiki", "repo.ext_issues"}, teams[0].Units)
41+
assert.True(t, util.IsEqualSlice(unit.AllUnitKeyNames(), teams[0].Units), fmt.Sprintf("%v == %v", unit.AllUnitKeyNames(), teams[0].Units))
4042
assert.EqualValues(t, "owner", teams[0].Permission)
4143

4244
assert.EqualValues(t, "test_team", teams[1].Name)

0 commit comments

Comments
 (0)