summaryrefslogtreecommitdiff
path: root/rt/lib/t/regression
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/t/regression')
-rw-r--r--rt/lib/t/regression/00placeholder1
-rw-r--r--rt/lib/t/regression/mime_tests19
2 files changed, 20 insertions, 0 deletions
diff --git a/rt/lib/t/regression/00placeholder b/rt/lib/t/regression/00placeholder
new file mode 100644
index 000000000..0afc6045c
--- /dev/null
+++ b/rt/lib/t/regression/00placeholder
@@ -0,0 +1 @@
+1;
diff --git a/rt/lib/t/regression/mime_tests b/rt/lib/t/regression/mime_tests
new file mode 100644
index 000000000..26e4dbf84
--- /dev/null
+++ b/rt/lib/t/regression/mime_tests
@@ -0,0 +1,19 @@
+use RT::Ticket;
+use RT::Queue;
+
+use MIME::Parser;
+use File::Temp;
+use RT::EmailParser;
+
+open (HANDLE, "data/nested-mime-sample");
+my $parser = RT::EmailParser->new()
+ $parser->ParseMIMEEntityFromFileHandle(\*HANDLE);
+my $entity = $parser->Entity;
+
+my $q = RT::Queue->new($RT::SystemUser);
+$q->Load('general');
+ok ($q->Id, "Queue is loaded");
+my $Ticket = RT::Ticket->new($RT::SystemUser);
+my ($tid, $ttid, $msg) =$Ticket->Create( Queue => $q->Id, Subject => "Nested mime test", MIMEObj => $entity);
+ok ($tid, $msg);
+ok($Ticket->Id);