[Jifty-commit] jifty-dbi branch, master, updated. 0.69-3-g0b77302

Jifty commits jifty-commit at lists.jifty.org
Wed Jun 15 16:33:36 EDT 2011


The branch, master has been updated
       via  0b77302cd429c98298a046584bdbb7ee417f21f1 (commit)
      from  b570ddb778b4db2f780ec0eeed1e9f85f9754599 (commit)

Summary of changes:
 t/01records.t |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit 0b77302cd429c98298a046584bdbb7ee417f21f1
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Jun 15 16:32:28 2011 -0400

    Test that setting manual sort order works in models
    
    Currently it doesn't and this basic test fails.

diff --git a/t/01records.t b/t/01records.t
index 3d23c80..cd0ba50 100644
--- a/t/01records.t
+++ b/t/01records.t
@@ -8,7 +8,7 @@ use Test::More;
 BEGIN { require "t/utils.pl" }
 our (@available_drivers);
 
-use constant TESTS_PER_DRIVER => 71;
+use constant TESTS_PER_DRIVER => 72;
 
 my $total = scalar(@available_drivers) * TESTS_PER_DRIVER;
 plan tests => $total;
@@ -41,6 +41,8 @@ SKIP: {
         is_deeply( [sort($rec->readable_attributes)], [sort qw(address employee_id id name phone)], 'readable attributes' );
         is_deeply( [sort($rec->writable_attributes)], [sort qw(address employee_id name phone)], 'writable attributes' );
 
+        is $rec->column('employee_id')->sort_order, -1, "got manual sort order";
+
         can_ok($rec,'create');
 
         # Test create and load as class methods
@@ -309,7 +311,8 @@ column address =>
   default is '';
 
 column employee_id =>
-  type is 'int(8)';
+  type is 'int(8)',
+  order is -1;
 }
 }
 1;

-----------------------------------------------------------------------


More information about the Jifty-commit mailing list