Skip to content

Commit

Permalink
Specify ID in TestAPITeam (#22192)
Browse files Browse the repository at this point in the history
- 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>
  • Loading branch information
Gusted and KN4CK3R authored Dec 21, 2022
1 parent c4df10d commit 90572c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/integration/api_team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down

0 comments on commit 90572c5

Please sign in to comment.