Skip to content

Commit

Permalink
test CallWithDB added
Browse files Browse the repository at this point in the history
  • Loading branch information
yedf2 committed Dec 4, 2021
1 parent 5fc7e5a commit 7f271ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions test/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,7 @@ func TestBaseSqlDB(t *testing.T) {
dbr = db.Model(&BarrierModel{}).Where("gid=?", "gid2").Find(&[]BarrierModel{})
asserts.Equal(dbr.RowsAffected, int64(0))
barrier.BarrierID = 0
tx2, err := db.ToSQLDB().Begin()
asserts.Nil(err)
err = barrier.Call(tx2, func(tx *sql.Tx) error {
err = barrier.CallWithDB(db.ToSQLDB(), func(tx *sql.Tx) error {
dtmimp.Logf("submit gid2")
return nil
})
Expand Down

0 comments on commit 7f271ef

Please sign in to comment.