[Rt-commit] rt branch, 4.0/fulltext-search, updated. rt-4.0.0-192-g45224b8

Shawn Moore sartak at bestpractical.com
Thu May 5 16:29:11 EDT 2011


The branch, 4.0/fulltext-search has been updated
       via  45224b8941994098c349a14b0e1fc1c7de3eee9e (commit)
      from  b7d981f521647e14faf9d496068c0c6d6523770b (commit)

Summary of changes:
 t/fts/indexed_pg.t |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

- Log -----------------------------------------------------------------
commit 45224b8941994098c349a14b0e1fc1c7de3eee9e
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu May 5 16:28:52 2011 -0400

    Don't put the content we're searching for in test ticket subjects

diff --git a/t/fts/indexed_pg.t b/t/fts/indexed_pg.t
index 1d2ad0c..9789ba5 100644
--- a/t/fts/indexed_pg.t
+++ b/t/fts/indexed_pg.t
@@ -62,7 +62,7 @@ sub run_test {
 
     my $good_tickets = ($tix->Count == $count);
     while ( my $ticket = $tix->Next ) {
-        next if $checks{ $ticket->Subject };
+        next if $checks{ $ticket->id };
         diag $ticket->Subject ." ticket has been found when it's not expected";
         $good_tickets = 0;
     }
@@ -73,14 +73,17 @@ sub run_test {
 
 @tickets = RT::Test->create_tickets(
     { Queue => $q->id },
-    { Subject => 'book', Content => 'book' },
-    { Subject => 'bar', Content => 'bar' },
+    { Subject => 'fts test 1', Content => 'book' },
+    { Subject => 'fts test 2', Content => 'bar'  },
 );
 sync_index();
 
+my $book = $tickets[0];
+my $bar  = $tickets[1];
+
 run_tests(
-    "Content LIKE 'book'" => { book => 1, bar => 0 },
-    "Content LIKE 'bar'" => { book => 0, bar => 1 },
+    "Content LIKE 'book'" => { $book->id => 1, $bar->id => 0 },
+    "Content LIKE 'bar'"  => { $book->id => 0, $bar->id => 1 },
 );
 
 @tickets = ();

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


More information about the Rt-commit mailing list