Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Braithwaite committed Mar 31, 2021
1 parent 6258c9a commit af474fb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions named_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ func TestNamedQueries(t *testing.T) {
{FirstName: "Ngani", LastName: "Laumape", Email: "nlaumape@ab.co.nz"},
}

insert := fmt.Sprintf("INSERT INTO person (first_name, last_name, email, added_at) VALUES (:first_name, :last_name, :email, %v)\n", now)
insert := fmt.Sprintf(
"INSERT INTO person (first_name, last_name, email, added_at) VALUES (:first_name, :last_name, :email, %v)\n",
now,
)
_, err = db.NamedExec(insert, sls)
test.Error(err)

Expand All @@ -214,7 +217,7 @@ func TestNamedQueries(t *testing.T) {
}

_, err = db.NamedExec(`INSERT INTO person (first_name, last_name, email)
VALUES (:first_name, :last_name, :email) `, slsMap)
VALUES (:first_name, :last_name, :email) ;--`, slsMap)
test.Error(err)

type A map[string]interface{}
Expand All @@ -226,7 +229,7 @@ func TestNamedQueries(t *testing.T) {
}

_, err = db.NamedExec(`INSERT INTO person (first_name, last_name, email)
VALUES (:first_name, :last_name, :email) `, typedMap)
VALUES (:first_name, :last_name, :email) ;--`, typedMap)
test.Error(err)

for _, p := range sls {
Expand Down

0 comments on commit af474fb

Please sign in to comment.