diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-07 07:27:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 07:27:09 +0200 |
commit | 3607f79d7869046d919fed05a21b55b6e61df1fa (patch) | |
tree | 9a176a4d5b67ac3a81ae210e9164d81959221ce0 /services/gitdiff/csv_test.go | |
parent | 51775f65bc933843199320b040186703a2bb9f51 (diff) | |
download | gitea-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.go | 6 |
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) } |