You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
674 B

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