[Rt-commit] r12848 - in rt/branches/3.8-TESTING: .

sartak at bestpractical.com sartak at bestpractical.com
Tue Jun 3 14:22:07 EDT 2008


Author: sartak
Date: Tue Jun  3 14:22:07 2008
New Revision: 12848

Added:
   rt/branches/3.8-TESTING/t/web/quicksearch.t
Modified:
   rt/branches/3.8-TESTING/   (props changed)

Log:
 r61477 at onn:  sartak | 2008-06-03 14:19:56 -0400
 Failing test for merge then search failing


Added: rt/branches/3.8-TESTING/t/web/quicksearch.t
==============================================================================
--- (empty file)
+++ rt/branches/3.8-TESTING/t/web/quicksearch.t	Tue Jun  3 14:22:07 2008
@@ -0,0 +1,51 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+
+use Test::More tests => 6;
+use RT::Test;
+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 at localhost',
+    MIMEObj   => MIME::Entity->build(
+        From    => 'customsearch at localhost',
+        To      => 'rt at 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 at localhost',
+    MIMEObj   => MIME::Entity->build(
+        From    => 'customsearch at localhost',
+        To      => 'rt at 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');
+$m->submit;
+
+$m->content_contains('Found 1 ticket');
+


More information about the Rt-commit mailing list