[Bps-public-commit] r18939 - DBIx-SearchBuilder/trunk/t
ruz at bestpractical.com
ruz at bestpractical.com
Thu Mar 26 04:17:38 EDT 2009
Author: ruz
Date: Thu Mar 26 04:17:37 2009
New Revision: 18939
Modified:
DBIx-SearchBuilder/trunk/t/01records.t
Log:
* test Handle->Fields
Modified: DBIx-SearchBuilder/trunk/t/01records.t
==============================================================================
--- DBIx-SearchBuilder/trunk/t/01records.t (original)
+++ DBIx-SearchBuilder/trunk/t/01records.t Thu Mar 26 04:17:37 2009
@@ -7,7 +7,7 @@
BEGIN { require "t/utils.pl" }
our (@AvailableDrivers);
-use constant TESTS_PER_DRIVER => 65;
+use constant TESTS_PER_DRIVER => 67;
my $total = scalar(@AvailableDrivers) * TESTS_PER_DRIVER;
plan tests => $total;
@@ -31,6 +31,18 @@
my $rec = TestApp::Address->new($handle);
isa_ok($rec, 'DBIx::SearchBuilder::Record');
+# Handle->Fields
+ is_deeply(
+ [$handle->Fields('Address')],
+ [qw(id name phone employeeid)],
+ "listed all columns in the table"
+ );
+ is_deeply(
+ [$handle->Fields('Some')],
+ [],
+ "no table -> no fields"
+ );
+
# _Accessible testings
is( $rec->_Accessible('id' => 'read'), 1, 'id is accessible for read' );
is( $rec->_Accessible('id' => 'write'), undef, 'id is not accessible for write' );
More information about the Bps-public-commit
mailing list