mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	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>
This commit is contained in:
		@@ -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})
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user