[Jifty-commit] r1449 - Jifty-DBI/trunk/t
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jul 2 23:42:20 EDT 2006
Author: ruz
Date: Sun Jul 2 23:42:19 2006
New Revision: 1449
Modified:
Jifty-DBI/trunk/t/02records_cachable.t
Log:
* add cache tests: columns names are case insensetive so we should
generate cache key insenstive too
Modified: Jifty-DBI/trunk/t/02records_cachable.t
==============================================================================
--- Jifty-DBI/trunk/t/02records_cachable.t (original)
+++ Jifty-DBI/trunk/t/02records_cachable.t Sun Jul 2 23:42:19 2006
@@ -7,7 +7,7 @@
use Test::More;
BEGIN { require "t/utils.pl" }
-use constant TESTS_PER_DRIVER => 30;
+use constant TESTS_PER_DRIVER => 35;
our (@available_drivers);
my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
@@ -98,6 +98,20 @@
Jifty::DBI::Record::Cachable->flush_cache;
+{ # case insensetive columns names
+ my $rec = TestApp::Address->new( handle => $handle );
+ ok($rec->load_by_cols( Name => 'Jesse' ), "Loaded the record");
+ is($rec->name, 'Jesse', "loaded record");
+
+ my $rec_cache = TestApp::Address->new( handle => $handle );
+ my ($status, $msg) = $rec_cache->load_by_cols( name => 'Jesse' );
+ ok($status, 'loaded record');
+ is($rec_cache->id, $rec->id, 'the same record as we created');
+ is($msg, 'Fetched from cache', 'we fetched record from cache');
+}
+
+ Jifty::DBI::Record::Cachable->flush_cache;
+
cleanup_schema( 'TestApp::Address', $handle );
}} # SKIP, foreach blocks
More information about the Jifty-commit
mailing list