[Rt-commit] rt branch, 4.0/test-for-skip-empty-orderby-items, created. rt-4.0.4-279-ge49befe
Ruslan Zakirov
ruz at bestpractical.com
Thu Feb 2 16:44:36 EST 2012
The branch, 4.0/test-for-skip-empty-orderby-items has been created
at e49befe8af1baf701b377bd606f351dfa6176960 (commit)
- Log -----------------------------------------------------------------
commit e49befe8af1baf701b377bd606f351dfa6176960
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Feb 3 01:43:33 2012 +0400
failing test for fix in 4.0/skip-empty-orderby-items branch
diff --git a/t/web/query_builder.t b/t/web/query_builder.t
index 0abbfac..5a64d46 100644
--- a/t/web/query_builder.t
+++ b/t/web/query_builder.t
@@ -5,7 +5,7 @@ use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
use Encode;
-use RT::Test tests => 56;
+use RT::Test tests => 70;
my $cookie_jar = HTTP::Cookies->new;
my ($baseurl, $agent) = RT::Test->started_ok;
@@ -295,3 +295,34 @@ diag "click advanced, enter a valid SQL, but the field is lower cased";
);
}
+diag "make sure skipped order by field doesn't break search";
+{
+ my $t = RT::Test->create_ticket( Queue => 'General', Subject => 'test' );
+ ok $t && $t->id, 'created a ticket';
+
+ $agent->get_ok($url."Search/Edit.html");
+ ok($agent->form_name('BuildQueryAdvanced'), "found the form");
+ $agent->field("Query", "id = ". $t->id);
+ $agent->submit;
+
+ $agent->follow_link_ok({id => 'page-results'});
+ ok( $agent->find_link(
+ text => $t->id,
+ url_regex => qr{/Ticket/Display\.html},
+ ), "link to the ticket" );
+
+ $agent->follow_link_ok({id => 'page-edit_search'});
+ $agent->form_name('BuildQuery');
+ $agent->field("OrderBy", 'Requestor.EmailAddress', 3);
+ $agent->submit;
+ $agent->form_name('BuildQuery');
+ is $agent->value('OrderBy', 1), 'id';
+ is $agent->value('OrderBy', 2), '';
+ is $agent->value('OrderBy', 3), 'Requestor.EmailAddress';
+
+ $agent->follow_link_ok({id => 'page-results'});
+ ok( $agent->find_link(
+ text => $t->id,
+ url_regex => qr{/Ticket/Display\.html},
+ ), "link to the ticket" );
+}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list