Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
best-practical
rt-extension-commandbymail
Commits
6b2516b7
Commit
6b2516b7
authored
Feb 07, 2013
by
Ruslan Zakirov
Browse files
this doesn't test anything in the extension
parent
6e6a27f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
54 deletions
+0
-54
xt/04.send.t
xt/04.send.t
+0
-54
No files found.
xt/04.send.t
deleted
100644 → 0
View file @
6e6a27f5
#!/usr/bin/env perl
use
strict
;
use
warnings
;
use
Test::
More
tests
=>
1
;
use
File::
Temp
qw/ tempfile tempdir /
;
BEGIN
{
require
'
xt/utils.pl
'
}
RT::
Init
;
diag
("
test errors via mailgate
")
if
$ENV
{'
TEST_VERBOSE
'};
{
my
$message_id
=
"
foobar-$$
\@
example.com
";
my
$text
=
<<END;
Subject: error test
From: root\@localhost
Message-Id: $message_id
Owner: this-user-does-not-exist\@example.com
test
END
my
(
$fh
,
$filename
)
=
tempfile
();
diag
("
Tempfile:
$filename
");
if
(
RT
->
can
('
Config
')
&&
RT
->
Config
->
can
('
Set
'))
{
RT
->
Config
->
Set
(
MailCommand
=>
'
sendmailpipe
');
RT
->
Config
->
Set
(
SendmailPath
=>
"
cat >
$filename
;
");
RT
->
Config
->
Set
(
SendmailBounceArguments
=>
'');
RT
->
Config
->
Set
(
SendmailArguments
=>
'');
}
else
{
$
RT::
MailCommand
=
'
sendmailpipe
';
$
RT::
SendmailPath
=
"
cat >
$filename
;
";
$
RT::
SendmailBounceArguments
=
'';
$
RT::
SendmailArguments
=
'';
}
use
RT::
EmailParser
;
my
$parser
=
RT::
EmailParser
->
new
();
$parser
->
ParseMIMEEntityFromScalar
(
$text
);
RT::Interface::Email::
MailError
(
To
=>
'
root@localhost
',
Subject
=>
"
Extended mailgate error
",
Explanation
=>
"
FUBARed
",
MIMEObj
=>
$parser
->
Entity
,
);
ok
(
(
grep
{
/^In-Reply-To: $message_id$/
}
<
$fh
>
),
"
Set the In-Reply-To: header properly
"
);
}
1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment