[Bps-public-commit] Net-Trac branch, master, updated. 605ac65f9187f835c144dceb906dde03b1a5ff13
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Tue Jun 2 06:34:34 EDT 2009
The branch, master has been updated
via 605ac65f9187f835c144dceb906dde03b1a5ff13 (commit)
from 980f3884b67877ddc00a0762e05e700c9d60561d (commit)
Summary of changes:
t/attachments.t | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 605ac65f9187f835c144dceb906dde03b1a5ff13
Author: sunnavy <sunnavy at gmail.com>
Date: Tue Jun 2 16:43:50 2009 +0800
content_type test for attachment
diff --git a/t/attachments.t b/t/attachments.t
index 3dcbcdb..104f967 100644
--- a/t/attachments.t
+++ b/t/attachments.t
@@ -4,7 +4,7 @@ use strict;
use Test::More;
unless (`which trac-admin`) { plan skip_all => 'You need trac installed to run the tests'; }
-plan tests => 29;
+plan tests => 30;
use_ok('Net::Trac::Connection');
use_ok('Net::Trac::Ticket');
@@ -42,7 +42,7 @@ ok($ticket->update( comment => 'I like moose.' ), "Creating comment about moose.
is(@{$ticket->history->entries}, 2, "Got 2 history entries.");
like($ticket->history->entries->[1]->content, qr/I like moose./, "The comment looks correct.");
-my ($fh, $filename) = tempfile();
+my ($fh, $filename) = tempfile(SUFFIX => '.txt');
my $alpha = join '', 'A'..'Z';
print $fh "$alpha\n"; # 27 bytes
close $fh;
@@ -58,4 +58,5 @@ is($ticket->attachments->[-1]->author, 'hiro', "Got right author!");
like($filename, qr/\E@{[$ticket->attachments->[-1]->filename]}\E/, "Got right filename!");
is($ticket->attachments->[-1]->description, 'Test description', "Got right description!");
is($ticket->attachments->[-1]->content, "$alpha\n", "Got right content!");
+is($ticket->attachments->[-1]->content_type, "text/plain", "Got right content type!");
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list