summaryrefslogtreecommitdiff
path: root/rt/t/api/attachment_filename.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
committerIvan Kohler <ivan@freeside.biz>2012-04-24 11:35:56 -0700
commit6587f6ba7d047ddc1686c080090afe7d53365bd4 (patch)
treeec77342668e8865aca669c9b4736e84e3077b523 /rt/t/api/attachment_filename.t
parent47153aae5c2fc00316654e7277fccd45f72ff611 (diff)
first pass RT4 merge, RT#13852
Diffstat (limited to 'rt/t/api/attachment_filename.t')
-rw-r--r--rt/t/api/attachment_filename.t26
1 files changed, 13 insertions, 13 deletions
diff --git a/rt/t/api/attachment_filename.t b/rt/t/api/attachment_filename.t
index 2eced0127..bcbfe0057 100644
--- a/rt/t/api/attachment_filename.t
+++ b/rt/t/api/attachment_filename.t
@@ -1,6 +1,6 @@
use RT::Test tests => 5;
use MIME::Entity;
-my $ticket = RT::Ticket->new($RT::SystemUser);
+my $ticket = RT::Ticket->new(RT->SystemUser);
my $mime = MIME::Entity->build(
From => 'test@example.com',
Type => 'text/html',
@@ -8,32 +8,32 @@ my $mime = MIME::Entity->build(
);
$mime->attach(
- Path => 'share/html/NoAuth/images/bplogo.gif',
- Type => 'image/gif',
+ Path => 'share/html/NoAuth/images/bpslogo.png',
+ Type => 'image/png',
);
$mime->attach(
- Path => 'share/html/NoAuth/images/bplogo.gif',
- Type => 'image/gif',
- Filename => 'bplogo.gif',
+ Path => 'share/html/NoAuth/images/bpslogo.png',
+ Type => 'image/png',
+ Filename => 'bpslogo.png',
);
$mime->attach(
- Path => 'share/html/NoAuth/images/bplogo.gif',
- Filename => 'images/bplogo.gif',
- Type => 'image/gif',
+ Path => 'share/html/NoAuth/images/bpslogo.png',
+ Filename => 'images/bpslogo.png',
+ Type => 'image/png',
);
my $id = $ticket->Create( MIMEObj => $mime, Queue => 'General' );
ok( $id, "created ticket $id" );
-my $atts = RT::Attachments->new( $RT::SystemUser );
-$atts->Limit( FIELD => 'ContentType', VALUE => 'image/gif' );
-is( $atts->Count, 3, 'got 3 gif files' );
+my $atts = RT::Attachments->new( RT->SystemUser );
+$atts->Limit( FIELD => 'ContentType', VALUE => 'image/png' );
+is( $atts->Count, 3, 'got 3 png files' );
# no matter if mime's filename include path or not,
# we should throw away the path all the time.
while ( my $att = $atts->Next ) {
- is( $att->Filename, 'bplogo.gif', "attachment's filename" );
+ is( $att->Filename, 'bpslogo.png', "attachment's filename" );
}