mirror of
https://github.com/astaxie/beego.git
synced 2024-11-15 02:00: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, err)
|
||||||
throwFail(t, AssertIs(num, 1))
|
throwFail(t, AssertIs(num, 1))
|
||||||
|
|
||||||
num, err = qs.Filter("user_name__strictexact", "Slene").Count()
|
if dORM.Driver().Name() == "mysql" {
|
||||||
throwFail(t, err)
|
// Now only mysql support `strictexact`
|
||||||
throwFail(t, AssertIs(num, 0))
|
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()
|
num, err = qs.Filter("user_name__strictexact", "slene").Count()
|
||||||
throwFail(t, err)
|
throwFail(t, err)
|
||||||
throwFail(t, AssertIs(num, 1))
|
throwFail(t, AssertIs(num, 1))
|
||||||
|
}
|
||||||
|
|
||||||
num, err = qs.Filter("user_name__contains", "e").Count()
|
num, err = qs.Filter("user_name__contains", "e").Count()
|
||||||
throwFail(t, err)
|
throwFail(t, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user