[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.1-43-g0883987

? sunnavy sunnavy at bestpractical.com
Mon Dec 2 10:56:23 EST 2013


The branch, 4.2-trunk has been updated
       via  0883987e9e52b1985ac7a34c04476b4090dbded0 (commit)
      from  8c818e2a9d99c522c52d05f2c100646a53db755b (commit)

Summary of changes:
 t/web/rest-search-queue.t | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

- Log -----------------------------------------------------------------
commit 0883987e9e52b1985ac7a34c04476b4090dbded0
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Mon Dec 2 23:34:25 2013 +0800

    ucfirst all the queue names to make tests happy on Oracle
    
    currently we use db's default orderby behavior. on most db, it's case
    insensitive, but not for Oracle. this commit simply gets around this edge case
    to make tests happy.
    
    we may need to specially handle Oracle for this in the future though.

diff --git a/t/web/rest-search-queue.t b/t/web/rest-search-queue.t
index c3ae8d7..a827d86 100644
--- a/t/web/rest-search-queue.t
+++ b/t/web/rest-search-queue.t
@@ -2,9 +2,9 @@ use strict;
 use warnings;
 use RT::Test tests => undef;
 
-my $queue_foo = RT::Test->load_or_create_queue( Name => 'foo' );
-my $queue_bar = RT::Test->load_or_create_queue( Name => 'bar' );
-my $queue_baz = RT::Test->load_or_create_queue( Name => 'baz' );
+my $queue_foo = RT::Test->load_or_create_queue( Name => 'Foo' );
+my $queue_bar = RT::Test->load_or_create_queue( Name => 'Bar' );
+my $queue_baz = RT::Test->load_or_create_queue( Name => 'Baz' );
 $queue_baz->SetDisabled(1);
 
 my ( $baseurl, $m ) = RT::Test->started_ok;
@@ -42,37 +42,37 @@ search_queues_ok(
 
 search_queues_ok(
     { query => '', orderby => 'id' },
-    [ '1: General', $queue_foo->id . ': foo', $queue_bar->id . ': bar', ],
+    [ '1: General', $queue_foo->id . ': Foo', $queue_bar->id . ': Bar', ],
     'order by id'
 );
 
 search_queues_ok(
     { query => '', orderby => 'name' },
-    [ $queue_bar->id . ': bar', $queue_foo->id . ': foo', '1: General', ],
+    [ $queue_bar->id . ': Bar', $queue_foo->id . ': Foo', '1: General', ],
     'order by name'
 );
 
 search_queues_ok(
     { query => '', orderby => '+name' },
-    [ $queue_bar->id . ': bar', $queue_foo->id . ': foo', '1: General', ],
+    [ $queue_bar->id . ': Bar', $queue_foo->id . ': Foo', '1: General', ],
     'order by +name'
 );
 
 search_queues_ok(
     { query => '', orderby => '-name' },
-    [ '1: General', $queue_foo->id . ': foo', $queue_bar->id . ': bar', ],
+    [ '1: General', $queue_foo->id . ': Foo', $queue_bar->id . ': Bar', ],
     'order by -name'
 );
 
 search_queues_ok(
     { query => 'Disabled = 0', orderby => 'id' },
-    [ '1: General', $queue_foo->id . ': foo', $queue_bar->id . ': bar', ],
+    [ '1: General', $queue_foo->id . ': Foo', $queue_bar->id . ': Bar', ],
     'enabled queues'
 );
 
 search_queues_ok(
     { query => 'Disabled = 1', orderby => 'id' },
-    [ $queue_baz->id . ': baz', ],
+    [ $queue_baz->id . ': Baz', ],
     'disabled queues'
 );
 

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


More information about the rt-commit mailing list