[Rt-commit] r8146 - rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ordered-1

ruz at bestpractical.com ruz at bestpractical.com
Thu Jul 12 20:22:42 EDT 2007


Author: ruz
Date: Thu Jul 12 20:22:39 2007
New Revision: 8146

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ordered-1/0query_builder.t

Log:
* add regression test for the QB

Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ordered-1/0query_builder.t
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ordered-1/0query_builder.t	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/t/ordered-1/0query_builder.t	Thu Jul 12 20:22:39 2007
@@ -238,4 +238,26 @@
 
 }
 
+# click advanced, enter "C1 OR ( C2 AND C3 )", apply, aggregators should stay the same.
+{
+    my $response = $agent->get( $url."Search/Edit.html" );
+    ok $response->is_success, "Fetched /Search/Edit.html";
+    ok $agent->form_number(3), "found the form";
+    $agent->field("Query", "( Status = 'new' OR Status = 'open' )");
+    $agent->submit;
+    is( getQueryFromForm,
+        "( Status = 'new' OR Status = 'open' )",
+        "query is the same"
+    );
+    $agent->select("clauses", [qw(0 1 2)]);
+    $agent->field( ValueOfid => 10 );
+    $agent->submit;
+
+
+    is( getQueryFromForm,
+        "id < 10",
+        "replaced query successfuly"
+    );
+}
+
 1;


More information about the Rt-commit mailing list