Test utils reuse.
This commit is contained in:
parent
74288d5418
commit
d3d00910aa
16 changed files with 200 additions and 221 deletions
|
|
@ -3,19 +3,19 @@ package mysql
|
|||
import "testing"
|
||||
|
||||
func TestLockRead(t *testing.T) {
|
||||
assertStatement(t, table2.LOCK().READ(), `
|
||||
assertStatementSql(t, table2.LOCK().READ(), `
|
||||
LOCK TABLES db.table2 READ;
|
||||
`)
|
||||
}
|
||||
|
||||
func TestLockWrite(t *testing.T) {
|
||||
assertStatement(t, table2.LOCK().WRITE(), `
|
||||
assertStatementSql(t, table2.LOCK().WRITE(), `
|
||||
LOCK TABLES db.table2 WRITE;
|
||||
`)
|
||||
}
|
||||
|
||||
func TestUNLOCK_TABLES(t *testing.T) {
|
||||
assertStatement(t, UNLOCK_TABLES(), `
|
||||
assertStatementSql(t, UNLOCK_TABLES(), `
|
||||
UNLOCK TABLES;
|
||||
`)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue