Bugfix for unicode characters in commit message
Test: Regression tests included Change-Id: I92d4bc0a2962d8dd9d9a3c6fde53d7fbd37891e2
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
cst "repodiff/constants"
|
||||
ent "repodiff/entities"
|
||||
"repodiff/repositories"
|
||||
)
|
||||
|
||||
func TestRegressionIncorrectStringValue(t *testing.T) {
|
||||
commitRows, _ := CSVFileToCommitRows("testdata/commit.csv")
|
||||
analyzed := make([]ent.AnalyzedCommitRow, len(commitRows))
|
||||
for i, row := range commitRows {
|
||||
analyzed[i] = ent.AnalyzedCommitRow{
|
||||
CommitRow: row,
|
||||
Type: cst.Empty,
|
||||
}
|
||||
}
|
||||
|
||||
c, _ := repositories.NewCommitRepository(
|
||||
ent.MappedDiffTarget{
|
||||
UpstreamTarget: 1,
|
||||
DownstreamTarget: 2,
|
||||
},
|
||||
)
|
||||
err := c.InsertCommitRows(analyzed)
|
||||
assert.Equal(t, nil, err, "Error should be nil")
|
||||
}
|
||||
Reference in New Issue
Block a user