diff options
author | ivan <ivan> | 2011-04-18 23:15:19 +0000 |
---|---|---|
committer | ivan <ivan> | 2011-04-18 23:15:19 +0000 |
commit | b5c4237a34aef94976bc343c8d9e138664fc3984 (patch) | |
tree | ba7cb2c13c199b1012c661fcf4f248e7b7e3d36f /rt/t/web/query_builder.t | |
parent | 96a0d937cdfe26d691e59139088e33e0bc3e1184 (diff) | |
parent | 75162bb14b3e38d66617077843f4dfdcaf09d5c4 (diff) |
This commit was generated by cvs2svn to compensate for changes in r11022,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'rt/t/web/query_builder.t')
-rw-r--r-- | rt/t/web/query_builder.t | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/rt/t/web/query_builder.t b/rt/t/web/query_builder.t index fa2c56da8..25d6ec5a3 100644 --- a/rt/t/web/query_builder.t +++ b/rt/t/web/query_builder.t @@ -5,7 +5,7 @@ use HTTP::Request::Common; use HTTP::Cookies; use LWP; use Encode; -use RT::Test tests => 44; +use RT::Test tests => 50; my $cookie_jar = HTTP::Cookies->new; my ($baseurl, $agent) = RT::Test->started_ok; @@ -256,3 +256,30 @@ diag "send query with not quoted negative number"; "query is the same" ); } + +diag "click advanced, enter an invalid SQL IS restriction, apply and check that we corrected it"; +{ + 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", "Requestor.EmailAddress IS 'FOOBAR'"); + $agent->submit; + is( getQueryFromForm($agent), + "Requestor.EmailAddress IS NULL", + "foobar is replaced by NULL" + ); +} + +diag "click advanced, enter an invalid SQL IS NOT restriction, apply and check that we corrected it"; +{ + 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", "Requestor.EmailAddress IS NOT 'FOOBAR'"); + $agent->submit; + is( getQueryFromForm($agent), + "Requestor.EmailAddress IS NOT NULL", + "foobar is replaced by NULL" + ); +} + |