[Rt-commit] rt branch, 4.0/bookmark-ticketsql-ordering, updated. rt-4.0.4-217-gfbbe5ee

Alex Vandiver alexmv at bestpractical.com
Mon Jan 23 17:22:26 EST 2012


The branch, 4.0/bookmark-ticketsql-ordering has been updated
       via  fbbe5eed582a4e7e50a2feb584ceec4be7b4df22 (commit)
      from  9d3a6272fbfe0c366c63bfebcf593aff24035fae (commit)

Summary of changes:
 t/api/bookmarks.t |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit fbbe5eed582a4e7e50a2feb584ceec4be7b4df22
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Jan 23 17:21:29 2012 -0500

    Add explicit tests for both AND/OR, and interaction with id

diff --git a/t/api/bookmarks.t b/t/api/bookmarks.t
index 138fd49..65b1945 100644
--- a/t/api/bookmarks.t
+++ b/t/api/bookmarks.t
@@ -1,6 +1,6 @@
 use strict;
 use warnings;
-use RT::Test tests => 32;
+use RT::Test tests => 36;
 
 my ( $url, $m ) = RT::Test->started_ok;
 my $root = RT::Test->load_or_create_user( Name => 'root' );
@@ -13,8 +13,12 @@ $root->SetAttribute( Name => 'Bookmarks', Content => { map { $_ => 1 } (3,6,9) }
 my $cu = RT::CurrentUser->new($root);
 my $bookmarks = RT::Tickets->new($cu);
 for my $search ( "Queue = 'General' AND id = '__Bookmarked__'",
-                 "id = '__Bookmarked__' AND Queue = 'General'" ) {
+                 "id = '__Bookmarked__' AND Queue = 'General'",
+                 "id > 0 AND id = '__Bookmarked__'",
+                 "id = '__Bookmarked__' AND id > 0",
+                 "id = 3 OR id = '__Bookmarked__'",
+                 "id = '__Bookmarked__' OR id = 3",
+             ) {
     $bookmarks->FromSQL($search);
-    #diag $bookmarks->BuildSelectQuery;
     is($bookmarks->Count,3,"Found my 3 bookmarks for [$search]");
 }

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


More information about the Rt-commit mailing list