diff options
author | ivan <ivan> | 2009-12-31 13:16:41 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-31 13:16:41 +0000 |
commit | b4b0c7e72d7eaee2fbfc7022022c9698323203dd (patch) | |
tree | ba4cd21399e412c32fe3737eaa8478e3271509f9 /rt/t/web/quicksearch.t | |
parent | 2dfda73eeb3eae2d4f894099754794ef07d060dd (diff) |
import rt 3.8.7
Diffstat (limited to 'rt/t/web/quicksearch.t')
-rw-r--r-- | rt/t/web/quicksearch.t | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/rt/t/web/quicksearch.t b/rt/t/web/quicksearch.t new file mode 100644 index 000000000..cd9a8e76c --- /dev/null +++ b/rt/t/web/quicksearch.t @@ -0,0 +1,51 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use RT::Test tests => 7; +my ($baseurl, $m) = RT::Test->started_ok; +my $url = $m->rt_base_url; + +# merged tickets still show up in search +my $t1 = RT::Ticket->new($RT::SystemUser); +$t1->Create( + Subject => 'base ticket'.$$, + Queue => 'general', + Owner => 'root', + Requestor => 'customsearch@localhost', + MIMEObj => MIME::Entity->build( + From => 'customsearch@localhost', + To => 'rt@localhost', + Subject => 'base ticket'.$$, + Data => "DON'T SEARCH FOR ME", + ), +); +ok(my $id1 = $t1->id, 'created ticket for custom search'); + +my $t2 = RT::Ticket->new($RT::SystemUser); +$t2->Create( + Subject => 'merged away'.$$, + Queue => 'general', + Owner => 'root', + Requestor => 'customsearch@localhost', + MIMEObj => MIME::Entity->build( + From => 'customsearch@localhost', + To => 'rt@localhost', + Subject => 'merged away'.$$, + Data => "MERGEDAWAY", + ), +); +ok(my $id2 = $t2->id, 'created ticket for custom search'); + +my ($ok, $msg) = $t2->MergeInto($id1); +ok($ok, "merge: $msg"); + +ok($m->login, 'logged in'); + +$m->form_with_fields('q'); +$m->field(q => 'fulltext:MERGEDAWAY'); +TODO: { + local $TODO = "We don't yet handle merged ticket content searches right"; +$m->content_contains('Found 1 ticket'); +} +$m->content_contains('base ticket', "base ticket is found, not the merged-away ticket"); |