[Jifty-commit] r6527 - Jifty-DBI/branches/tisql/t/tisql

Jifty commits jifty-commit at lists.jifty.org
Sat Feb 28 16:15:34 EST 2009


Author: ruz
Date: Sat Feb 28 16:15:33 2009
New Revision: 6527

Modified:
   Jifty-DBI/branches/tisql/t/tisql/searches_links.t

Log:
* untodo a test
* test on mysql

Modified: Jifty-DBI/branches/tisql/t/tisql/searches_links.t
==============================================================================
--- Jifty-DBI/branches/tisql/t/tisql/searches_links.t	(original)
+++ Jifty-DBI/branches/tisql/t/tisql/searches_links.t	Sat Feb 28 16:15:33 2009
@@ -9,7 +9,7 @@
 BEGIN { require "t/utils.pl" }
 our (@available_drivers);
 
-use constant TESTS_PER_DRIVER => 29;
+use constant TESTS_PER_DRIVER => 32;
 
 my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
 plan tests => $total;
@@ -50,7 +50,7 @@
         ".links_to{model => 'task'}.dst_id = 2" => [qw(1_m_of_2)],
         ".links_to{type => 'member_of'}{model => 'task'}.dst_id = 2" => [qw(1_m_of_2)],
         ".links_from{type => 'member_of'}{model => 'task'}.src_id = 1" => [qw(2_has_m_1)],
-# TODO:        ".linked_tasks.subject = '2_has_m_1'" => [qw(qwe)],
+        ".linked_tasks.subject = '2_has_m_1'" => [qw(1_m_of_2)],
         ".linked_to_tasks.subject = '2_has_m_1'" => [qw(1_m_of_2)],
         ".linked_from_tasks.subject = '1_m_of_2'" => [qw(2_has_m_1)],
         ".member_of.subject = '2_has_m_1'" => [qw(1_m_of_2)],
@@ -110,6 +110,25 @@
 ) },
 ] }
 
+sub schema_mysql { [
+q{ CREATE table tasks (
+    id integer primary key AUTO_INCREMENT,
+    subject varchar(32)
+) },
+q{ CREATE table links (
+    id integer primary key AUTO_INCREMENT,
+    src_model varchar(32) not null,
+    src_id integer not null,
+    type varchar(32) not null,
+    dst_model varchar(32) not null,
+    dst_id integer not null
+) },
+] }
+sub cleanup_schema_mysql { [
+    "DROP table tasks", 
+    "DROP table links", 
+] }
+
 # definitions below to avoid problems with interdependencies
 package TestApp::LinkCollection;
 use base qw/Jifty::DBI::Collection/;


More information about the Jifty-commit mailing list