Files
android_development/tools/repo_diff/service/repodiff/controllers/regression_test.go
Scott Lobdell ed2b3e1565 Bugfix for unicode characters in commit message
Test: Regression tests included

Change-Id: I92d4bc0a2962d8dd9d9a3c6fde53d7fbd37891e2
2018-04-30 12:48:45 -07:00

32 lines
674 B
Go

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")
}