summaryrefslogtreecommitdiff
path: root/rt/t/api/searchbuilder.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-02-25 18:34:25 -0800
committerIvan Kohler <ivan@freeside.biz>2014-02-25 18:34:25 -0800
commit45d35d5739d05e602bc317739485693e0e9ff0b5 (patch)
tree61801368d96662baff145d3271fd887ca104391c /rt/t/api/searchbuilder.t
parent662be3ece2ef8c7f05fcbfaa699d80a6a73ca110 (diff)
RT 4.0.19
Diffstat (limited to 'rt/t/api/searchbuilder.t')
-rw-r--r--rt/t/api/searchbuilder.t26
1 files changed, 25 insertions, 1 deletions
diff --git a/rt/t/api/searchbuilder.t b/rt/t/api/searchbuilder.t
index 8562bfc2b..84568718d 100644
--- a/rt/t/api/searchbuilder.t
+++ b/rt/t/api/searchbuilder.t
@@ -2,7 +2,7 @@
use strict;
use warnings;
use RT;
-use RT::Test tests => 11;
+use RT::Test tests => 19;
{
@@ -37,3 +37,27 @@ is_deeply(\@items_ids, \@sorted_ids, "ItemsArrayRef sorts alphabetically by name
}
+#20767: CleanSlate doesn't clear RT::SearchBuilder's flags for handling Disabled columns
+{
+ my $items;
+
+ ok(my $queues = RT::Queues->new(RT->SystemUser), 'Created a queues object');
+ ok( $queues->UnLimit(),'Unlimited the result set of the queues object');
+
+ # sanity check
+ is( $queues->{'handled_disabled_column'} => undef, 'handled_disabled_column IS NOT set' );
+ is( $queues->{'find_disabled_rows'} => undef, 'find_disabled_rows IS NOT set ' );
+
+ $queues->LimitToDeleted;
+
+ # sanity check
+ ok( $queues->{'handled_disabled_column'}, 'handled_disabled_column IS set' );
+ ok( $queues->{'find_disabled_rows'}, 'find_disabled_rows IS set ' );
+
+ $queues->CleanSlate;
+
+ # these fail without the overloaded CleanSlate method
+ is( $queues->{'handled_disabled_column'} => undef, 'handled_disabled_column IS NOT set' );
+ is( $queues->{'find_disabled_rows'} => undef, 'find_disabled_rows IS NOT set ' );
+}
+