4 use RT::Test tests => 9;
5 my ($baseurl, $m) = RT::Test->started_ok;
6 my $url = $m->rt_base_url;
8 # merged tickets still show up in search
9 my $t1 = RT::Ticket->new(RT->SystemUser);
11 Subject => 'base ticket'.$$,
14 Requestor => 'customsearch@localhost',
15 MIMEObj => MIME::Entity->build(
16 From => 'customsearch@localhost',
18 Subject => 'base ticket'.$$,
19 Data => "DON'T SEARCH FOR ME",
22 ok(my $id1 = $t1->id, 'created ticket for custom search');
24 my $t2 = RT::Ticket->new(RT->SystemUser);
26 Subject => 'merged away'.$$,
29 Requestor => 'customsearch@localhost',
30 MIMEObj => MIME::Entity->build(
31 From => 'customsearch@localhost',
33 Subject => 'merged away'.$$,
37 ok(my $id2 = $t2->id, 'created ticket for custom search');
39 my ($ok, $msg) = $t2->MergeInto($id1);
40 ok($ok, "merge: $msg");
42 ok($m->login, 'logged in');
44 $m->form_with_fields('q');
45 $m->field(q => 'fulltext:MERGEDAWAY');
47 local $TODO = "We don't yet handle merged ticket content searches right";
48 $m->content_contains('Found 1 ticket');
50 $m->content_contains('base ticket', "base ticket is found, not the merged-away ticket");