Skip to content

Commit

Permalink
remove assert library
Browse files Browse the repository at this point in the history
  • Loading branch information
lqs committed May 30, 2024
1 parent 1d97dd0 commit 33af741
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions transaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"context"
"database/sql"
"errors"
"github.com/go-playground/assert/v2"
"testing"
)

Expand Down Expand Up @@ -152,7 +151,9 @@ func TestTransaction_Execute(t *testing.T) {
if _, err = tx.Execute("SQL 1 NOT SET INTERCEPTOR"); err != nil {
t.Error(err)
}
assert.Equal(t, sqlCount["SQL 1 NOT SET INTERCEPTOR"], 0)
if sqlCount["SQL 1 NOT SET INTERCEPTOR"] != 0 {
t.Error()
}

if err = tx.Rollback(); err != nil {
t.Error(err)
Expand All @@ -165,7 +166,9 @@ func TestTransaction_Execute(t *testing.T) {
if _, err = tx.Execute("SQL 2 SET INTERCEPTOR"); err != nil {
t.Error(err)
}
assert.Equal(t, sqlCount["SQL 2 SET INTERCEPTOR"], 1)
if sqlCount["SQL 2 SET INTERCEPTOR"] != 1 {
t.Error()
}

if err = tx.Commit(); err != nil {
t.Error(err)
Expand Down

0 comments on commit 33af741

Please sign in to comment.