mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	enable linter testifylint on v8 (#4573)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4573 Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								4d2263e82e
							
						
					
				
			
			
				commit
				
					
						ce563ade3d
					
				
			
		
					 503 changed files with 5014 additions and 4665 deletions
				
			
		|  | @ -12,6 +12,7 @@ import ( | |||
| 	webhook_module "code.gitea.io/gitea/modules/webhook" | ||||
| 
 | ||||
| 	"github.com/stretchr/testify/assert" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| ) | ||||
| 
 | ||||
| func Test_AddPayloadVersionToHookTaskTable(t *testing.T) { | ||||
|  | @ -40,14 +41,14 @@ func Test_AddPayloadVersionToHookTaskTable(t *testing.T) { | |||
| 		return | ||||
| 	} | ||||
| 
 | ||||
| 	assert.NoError(t, AddPayloadVersionToHookTaskTable(x)) | ||||
| 	require.NoError(t, AddPayloadVersionToHookTaskTable(x)) | ||||
| 
 | ||||
| 	expected := []HookTaskMigrated{} | ||||
| 	assert.NoError(t, x.Table("hook_task_migrated").Asc("id").Find(&expected)) | ||||
| 	require.NoError(t, x.Table("hook_task_migrated").Asc("id").Find(&expected)) | ||||
| 	assert.Len(t, expected, 2) | ||||
| 
 | ||||
| 	got := []HookTaskMigrated{} | ||||
| 	assert.NoError(t, x.Table("hook_task").Asc("id").Find(&got)) | ||||
| 	require.NoError(t, x.Table("hook_task").Asc("id").Find(&got)) | ||||
| 
 | ||||
| 	for i, expected := range expected { | ||||
| 		expected, got := expected, got[i] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue