Remove redundant code (#6087)
This commit is contained in:
		
							parent
							
								
									a80707de9e
								
							
						
					
					
						commit
						877cc9148f
					
				| @ -218,7 +218,7 @@ func TestFind(t *testing.T) { | |||||||
| 
 | 
 | ||||||
| 	// test array
 | 	// test array
 | ||||||
| 	var models2 [3]User | 	var models2 [3]User | ||||||
| 	if err := DB.Where("name in (?)", []string{"find"}).Find(&models2).Error; err != nil || len(models2) != 3 { | 	if err := DB.Where("name in (?)", []string{"find"}).Find(&models2).Error; err != nil { | ||||||
| 		t.Errorf("errors happened when query find with in clause: %v, length: %v", err, len(models2)) | 		t.Errorf("errors happened when query find with in clause: %v, length: %v", err, len(models2)) | ||||||
| 	} else { | 	} else { | ||||||
| 		for idx, user := range users { | 		for idx, user := range users { | ||||||
| @ -230,7 +230,7 @@ func TestFind(t *testing.T) { | |||||||
| 
 | 
 | ||||||
| 	// test smaller array
 | 	// test smaller array
 | ||||||
| 	var models3 [2]User | 	var models3 [2]User | ||||||
| 	if err := DB.Where("name in (?)", []string{"find"}).Find(&models3).Error; err != nil || len(models3) != 2 { | 	if err := DB.Where("name in (?)", []string{"find"}).Find(&models3).Error; err != nil { | ||||||
| 		t.Errorf("errors happened when query find with in clause: %v, length: %v", err, len(models3)) | 		t.Errorf("errors happened when query find with in clause: %v, length: %v", err, len(models3)) | ||||||
| 	} else { | 	} else { | ||||||
| 		for idx, user := range users[:2] { | 		for idx, user := range users[:2] { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jiepeng Cao
						Jiepeng Cao