mirror of
https://github.com/astaxie/beego.git
synced 2024-11-15 02:40:54 +00:00
skip strictexact operator test for db drivers other than mysql
This commit is contained in:
parent
60bb057783
commit
ff53e12191
@ -822,13 +822,16 @@ func TestOperators(t *testing.T) {
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 1))
|
||||
|
||||
num, err = qs.Filter("user_name__strictexact", "Slene").Count()
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 0))
|
||||
if dORM.Driver().Name() == "mysql" {
|
||||
// Now only mysql support `strictexact`
|
||||
num, err = qs.Filter("user_name__strictexact", "Slene").Count()
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 0))
|
||||
|
||||
num, err = qs.Filter("user_name__strictexact", "slene").Count()
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 1))
|
||||
num, err = qs.Filter("user_name__strictexact", "slene").Count()
|
||||
throwFail(t, err)
|
||||
throwFail(t, AssertIs(num, 1))
|
||||
}
|
||||
|
||||
num, err = qs.Filter("user_name__contains", "e").Count()
|
||||
throwFail(t, err)
|
||||
|
Loading…
Reference in New Issue
Block a user