[Rt-commit] rt branch, googleish-refactor, updated. rt-3.9.4-464-g4869824

Alex Vandiver alexmv at bestpractical.com
Mon Nov 15 13:10:26 EST 2010


The branch, googleish-refactor has been updated
       via  48698247204eef26124e432c8277329fa9bdf37d (commit)
       via  640a23e49d078b25a6f4d9a740be9c74b409f644 (commit)
       via  426039f687d9b3f8182b9e5fb79fe9def19bbf79 (commit)
      from  85986448f121f9bed5a5994a1cb5e106f24fa652 (commit)

Summary of changes:
 t/web/googleish_search.t |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 426039f687d9b3f8182b9e5fb79fe9def19bbf79
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Nov 15 13:03:20 2010 -0500

    Fix tests -- quoting _should_ only kick in on ' and \

diff --git a/t/web/googleish_search.t b/t/web/googleish_search.t
index 218b65f..61c585a 100644
--- a/t/web/googleish_search.t
+++ b/t/web/googleish_search.t
@@ -44,7 +44,7 @@ ok $two_words_queue && $two_words_queue->id, 'loaded or created a queue';
         "$active AND ( Subject LIKE 'foo \\' bar' )",
         "correct parsing";
     is $parser->QueryToSQL('"\f\o\o"'),
-        "$active AND ( Subject LIKE 'foo' )",
+        "$active AND ( Subject LIKE '\\\\f\\\\o\\\\o' )",
         "correct parsing";
 
     is $parser->QueryToSQL("General"), "( Queue = 'General' ) AND $active", "correct parsing";

commit 640a23e49d078b25a6f4d9a740be9c74b409f644
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Nov 15 13:03:47 2010 -0500

    Fix tests -- "me" is equivilent to your username

diff --git a/t/web/googleish_search.t b/t/web/googleish_search.t
index 61c585a..d150709 100644
--- a/t/web/googleish_search.t
+++ b/t/web/googleish_search.t
@@ -51,7 +51,7 @@ ok $two_words_queue && $two_words_queue->id, 'loaded or created a queue';
     is $parser->QueryToSQL("'Two Words'"), "( Queue = 'Two Words' ) AND $active", "correct parsing";
     is $parser->QueryToSQL("subject:'Two Words'"), "$active AND ( Subject LIKE 'Two Words' )", "correct parsing";
 
-    is $parser->QueryToSQL("me"), "$active AND ( Watcher.id = '__CurrentUser__' )", "correct parsing";
+    is $parser->QueryToSQL("me"), "( Owner.id = '__CurrentUser__' ) AND $active", "correct parsing";
     is $parser->QueryToSQL("'me'"), "$active AND ( Subject LIKE 'me' )", "correct parsing";
     is $parser->QueryToSQL("owner:me"), "( Owner.id = '__CurrentUser__' ) AND $active", "correct parsing";
     is $parser->QueryToSQL("owner:'me'"), "( Owner = 'me' ) AND $active", "correct parsing";

commit 48698247204eef26124e432c8277329fa9bdf37d
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Nov 15 13:08:21 2010 -0500

    Quoted phrases are always subject searches

diff --git a/t/web/googleish_search.t b/t/web/googleish_search.t
index d150709..ad37755 100644
--- a/t/web/googleish_search.t
+++ b/t/web/googleish_search.t
@@ -2,7 +2,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 77, config => 'Set( %FullTextSearch, Enable => 1, Indexed => 0 );';
+use RT::Test tests => 79, config => 'Set( %FullTextSearch, Enable => 1, Indexed => 0 );';
 my ($baseurl, $m) = RT::Test->started_ok;
 my $url = $m->rt_base_url;
 
@@ -48,7 +48,8 @@ ok $two_words_queue && $two_words_queue->id, 'loaded or created a queue';
         "correct parsing";
 
     is $parser->QueryToSQL("General"), "( Queue = 'General' ) AND $active", "correct parsing";
-    is $parser->QueryToSQL("'Two Words'"), "( Queue = 'Two Words' ) AND $active", "correct parsing";
+    is $parser->QueryToSQL("'Two Words'"), "$active AND ( Subject LIKE 'Two Words' )", "correct parsing";
+    is $parser->QueryToSQL("queue:'Two Words'"), "( Queue = 'Two Words' ) AND $active", "correct parsing";
     is $parser->QueryToSQL("subject:'Two Words'"), "$active AND ( Subject LIKE 'Two Words' )", "correct parsing";
 
     is $parser->QueryToSQL("me"), "( Owner.id = '__CurrentUser__' ) AND $active", "correct parsing";

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


More information about the Rt-commit mailing list