aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGusted <postmaster@gusted.xyz>2022-12-21 02:22:23 +0100
committerGitHub <noreply@github.com>2022-12-21 09:22:23 +0800
commit90572c5a22ab753e8e019d276426df7b1bf6d5b2 (patch)
tree35db9af22dd0efc417aa886807558592d566fea6 /tests
parentc4df10d219adf25203ba53baf3d6ccbad15362ec (diff)
downloadgitea-90572c5a22ab753e8e019d276426df7b1bf6d5b2.tar.gz
gitea-90572c5a22ab753e8e019d276426df7b1bf6d5b2.zip
Specify ID in `TestAPITeam` (#22192)
- There have been [CI failures](https://codeberg.org/forgejo/forgejo/issues/111) in this specific test function. The code on itself looks good, the CI failures are likely caused by not specifying any field in `TeamUser`, which might have caused to unittest to return another `TeamUser` than the code expects. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/api_team_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/integration/api_team_test.go b/tests/integration/api_team_test.go
index 46207203bc..f54c286fc9 100644
--- a/tests/integration/api_team_test.go
+++ b/tests/integration/api_team_test.go
@@ -24,7 +24,7 @@ import (
func TestAPITeam(t *testing.T) {
defer tests.PrepareTestEnv(t)()
- teamUser := unittest.AssertExistsAndLoadBean(t, &organization.TeamUser{})
+ teamUser := unittest.AssertExistsAndLoadBean(t, &organization.TeamUser{ID: 1})
team := unittest.AssertExistsAndLoadBean(t, &organization.Team{ID: teamUser.TeamID})
user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: teamUser.UID})