summaryrefslogtreecommitdiff
path: root/tests/it_dbi.t
diff options
context:
space:
mode:
authorChristian Schneider2009-02-17 13:48:04 +0000
committerChristian Schneider2009-02-17 13:48:04 +0000
commit3e691e8e56417de13e2b958386af2059ba80ebbd (patch)
treee1938914dea1ab5902c21944b493a44f9fd017e7 /tests/it_dbi.t
parent019f348b0c72105d3196c458f954ed4d330fd55d (diff)
downloaditools-3e691e8e56417de13e2b958386af2059ba80ebbd.tar.gz
itools-3e691e8e56417de13e2b958386af2059ba80ebbd.tar.bz2
itools-3e691e8e56417de13e2b958386af2059ba80ebbd.zip
Fix it_dbi NOT IN with empty array and added IN/NOT IN tests
Diffstat (limited to 'tests/it_dbi.t')
-rwxr-xr-xtests/it_dbi.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/it_dbi.t b/tests/it_dbi.t
index 9ffadc7..934e965 100755
--- a/tests/it_dbi.t
+++ b/tests/it_dbi.t
@@ -50,6 +50,26 @@ is(
"bar",
"select with multiple parameters (foo part)"
);
+is(
+ $record->select(array('ID IN' => array(2,3))),
+ 2,
+ "select with IN",
+);
+is(
+ $record->select(array('ID NOT IN' => array(2,3))),
+ 1,
+ "select with NOT IN",
+);
+is(
+ $record->select(array('ID IN' => array())),
+ 0,
+ "select with empty IN",
+);
+is(
+ $record->select(array('ID NOT IN' => array())),
+ 3,
+ "select with empty NOT IN",
+);
it_dbi::createclass(array('table' => "it_dbi_test", 'forcecreate' => true));