Use testify/require instead of testify/assert for tests.
This commit is contained in:
parent
ebcbadef24
commit
5d742837f1
32 changed files with 581 additions and 589 deletions
|
|
@ -1,7 +1,7 @@
|
|||
package mysql
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
|
@ -95,7 +95,7 @@ VALUES (?, ?),
|
|||
func TestInsertValuesFromModelColumnMismatch(t *testing.T) {
|
||||
defer func() {
|
||||
r := recover()
|
||||
assert.Equal(t, r, "missing struct field for column : col1")
|
||||
require.Equal(t, r, "missing struct field for column : col1")
|
||||
}()
|
||||
type Table1Model struct {
|
||||
Col1Prim int
|
||||
|
|
@ -116,7 +116,7 @@ func TestInsertFromNonStructModel(t *testing.T) {
|
|||
|
||||
defer func() {
|
||||
r := recover()
|
||||
assert.Equal(t, r, "jet: data has to be a struct")
|
||||
require.Equal(t, r, "jet: data has to be a struct")
|
||||
}()
|
||||
|
||||
table2.INSERT(table2ColInt).MODEL([]int{})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue