Update test case to handle the constraint result rows
This commit is contained in:
parent
9c0d887a3c
commit
b0146a5a76
@ -266,8 +266,9 @@ func test_TableConstraints(t *testing.T) {
|
|||||||
res, err := testClient.TableConstraints("editions")
|
res, err := testClient.TableConstraints("editions")
|
||||||
|
|
||||||
assert.Equal(t, nil, err)
|
assert.Equal(t, nil, err)
|
||||||
assert.Equal(t, 1, len(res.Columns))
|
assert.Equal(t, []string{"name", "definition"}, res.Columns)
|
||||||
assert.Equal(t, 2, len(res.Rows))
|
assert.Equal(t, Row{"pkey", "PRIMARY KEY (isbn)"}, res.Rows[0])
|
||||||
|
assert.Equal(t, Row{"integrity", "CHECK (book_id IS NOT NULL AND edition IS NOT NULL)"}, res.Rows[1])
|
||||||
}
|
}
|
||||||
|
|
||||||
func test_Query(t *testing.T) {
|
func test_Query(t *testing.T) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user