aboutsummaryrefslogtreecommitdiffstats
path: root/services/gitdiff/csv_test.go
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2021-06-07 07:27:09 +0200
committerGitHub <noreply@github.com>2021-06-07 07:27:09 +0200
commit3607f79d7869046d919fed05a21b55b6e61df1fa (patch)
tree9a176a4d5b67ac3a81ae210e9164d81959221ce0 /services/gitdiff/csv_test.go
parent51775f65bc933843199320b040186703a2bb9f51 (diff)
downloadgitea-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.gz
gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.zip
Fixed assert statements. (#16089)
Diffstat (limited to 'services/gitdiff/csv_test.go')
-rw-r--r--services/gitdiff/csv_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/gitdiff/csv_test.go b/services/gitdiff/csv_test.go
index f3dc0c2a2c..fb84d6ed06 100644
--- a/services/gitdiff/csv_test.go
+++ b/services/gitdiff/csv_test.go
@@ -110,13 +110,13 @@ func TestCSVDiff(t *testing.T) {
result, err := CreateCsvDiff(diff.Files[0], baseReader, headReader)
assert.NoError(t, err)
- assert.Equal(t, 1, len(result), "case %d: should be one section", n)
+ assert.Len(t, result, 1, "case %d: should be one section", n)
section := result[0]
- assert.Equal(t, len(c.cells), len(section.Rows), "case %d: should be %d rows", n, len(c.cells))
+ assert.Len(t, section.Rows, len(c.cells), "case %d: should be %d rows", n, len(c.cells))
for i, row := range section.Rows {
- assert.Equal(t, 2, len(row.Cells), "case %d: row %d should have two cells", n, i)
+ assert.Len(t, row.Cells, 2, "case %d: row %d should have two cells", n, i)
for j, cell := range row.Cells {
assert.Equal(t, c.cells[i][j], cell.Type, "case %d: row %d cell %d should be equal", n, i, j)
}