summaryrefslogtreecommitdiff
path: root/rt/t/web/attachment-with-name-0.t
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2012-07-02 14:24:21 -0700
committerIvan Kohler <ivan@freeside.biz>2012-07-02 14:24:21 -0700
commit85e677b86fc37c54e6de2b06340351a28f5a5916 (patch)
tree11148e2c292bd1a43b7cf6c2f5212a6ca8b03e75 /rt/t/web/attachment-with-name-0.t
parente5ab051ccdb7637d8dd2f0ed9b4fe9aaaf1d1100 (diff)
parent92aedddd3684167abb60cd3f1d77bbc156c592e6 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'rt/t/web/attachment-with-name-0.t')
-rw-r--r--rt/t/web/attachment-with-name-0.t23
1 files changed, 23 insertions, 0 deletions
diff --git a/rt/t/web/attachment-with-name-0.t b/rt/t/web/attachment-with-name-0.t
new file mode 100644
index 000000000..12a8dd548
--- /dev/null
+++ b/rt/t/web/attachment-with-name-0.t
@@ -0,0 +1,23 @@
+use strict;
+use warnings;
+
+use RT::Test tests => 8;
+my ( $baseurl, $m ) = RT::Test->started_ok;
+ok $m->login, 'logged in as root';
+
+use File::Spec;
+
+my $file = File::Spec->catfile( RT::Test->temp_directory, 0 );
+open my $fh, '>', $file or die $!;
+print $fh 'foobar';
+close $fh;
+
+$m->get_ok( '/Ticket/Create.html?Queue=1' );
+
+$m->submit_form(
+ form_number => 3,
+ fields => { Subject => 'test att 0', Content => 'test', Attach => $file },
+);
+$m->content_like( qr/Ticket \d+ created/i, 'created the ticket' );
+$m->follow_link_ok( { text => 'Download 0' } );
+$m->content_contains( 'foobar', 'file content' );