mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	fix go vet error (#3740)
This commit is contained in:
		| @@ -21,16 +21,16 @@ func assertLineEqual(t *testing.T, d1 *DiffLine, d2 *DiffLine) { | |||||||
|  |  | ||||||
| func TestDiffToHTML(t *testing.T) { | func TestDiffToHTML(t *testing.T) { | ||||||
| 	assertEqual(t, "+foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{ | 	assertEqual(t, "+foo <span class=\"added-code\">bar</span> biz", diffToHTML([]dmp.Diff{ | ||||||
| 		{dmp.DiffEqual, "foo "}, | 		{Type: dmp.DiffEqual, Text: "foo "}, | ||||||
| 		{dmp.DiffInsert, "bar"}, | 		{Type: dmp.DiffInsert, Text: "bar"}, | ||||||
| 		{dmp.DiffDelete, " baz"}, | 		{Type: dmp.DiffDelete, Text: " baz"}, | ||||||
| 		{dmp.DiffEqual, " biz"}, | 		{Type: dmp.DiffEqual, Text: " biz"}, | ||||||
| 	}, DiffLineAdd)) | 	}, DiffLineAdd)) | ||||||
|  |  | ||||||
| 	assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{ | 	assertEqual(t, "-foo <span class=\"removed-code\">bar</span> biz", diffToHTML([]dmp.Diff{ | ||||||
| 		{dmp.DiffEqual, "foo "}, | 		{Type: dmp.DiffEqual, Text: "foo "}, | ||||||
| 		{dmp.DiffDelete, "bar"}, | 		{Type: dmp.DiffDelete, Text: "bar"}, | ||||||
| 		{dmp.DiffInsert, " baz"}, | 		{Type: dmp.DiffInsert, Text: " baz"}, | ||||||
| 		{dmp.DiffEqual, " biz"}, | 		{Type: dmp.DiffEqual, Text: " biz"}, | ||||||
| 	}, DiffLineDel)) | 	}, DiffLineDel)) | ||||||
| } | } | ||||||
|   | |||||||
| @@ -32,7 +32,7 @@ func TestInitializeLabels(t *testing.T) { | |||||||
| 	ctx := test.MockContext(t, "user2/repo1/labels/initialize") | 	ctx := test.MockContext(t, "user2/repo1/labels/initialize") | ||||||
| 	test.LoadUser(t, ctx, 2) | 	test.LoadUser(t, ctx, 2) | ||||||
| 	test.LoadRepo(t, ctx, 2) | 	test.LoadRepo(t, ctx, 2) | ||||||
| 	InitializeLabels(ctx, auth.InitializeLabelsForm{"Default"}) | 	InitializeLabels(ctx, auth.InitializeLabelsForm{TemplateName: "Default"}) | ||||||
| 	assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) | 	assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) | ||||||
| 	models.AssertExistsAndLoadBean(t, &models.Label{ | 	models.AssertExistsAndLoadBean(t, &models.Label{ | ||||||
| 		RepoID: 2, | 		RepoID: 2, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Lunny Xiao
					Lunny Xiao