[Rt-commit] rt branch, 4.2/web-attachs-processing, updated. rt-3.9.7-1245-gf8a4b08
Ruslan Zakirov
ruz at bestpractical.com
Fri Mar 4 06:17:27 EST 2011
The branch, 4.2/web-attachs-processing has been updated
via f8a4b0833e0bd0842c38a19b8171064ec7b2aaf2 (commit)
from 5b133a0e9946afdd3c7883f54b0723e5c7f462fe (commit)
Summary of changes:
t/web/attachments.t | 40 +++++++++++++++++++++++++++++++++++++++-
1 files changed, 39 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit f8a4b0833e0bd0842c38a19b8171064ec7b2aaf2
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Mar 4 14:15:42 2011 +0300
test attachments uploads into several actions simultanously
diff --git a/t/web/attachments.t b/t/web/attachments.t
index 9870f45..a808014 100644
--- a/t/web/attachments.t
+++ b/t/web/attachments.t
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-use RT::Test tests => 112;
+use RT::Test tests => 122;
use constant LogoFile => $RT::MasonComponentRoot .'/NoAuth/images/bpslogo.png';
use constant FaviconFile => $RT::MasonComponentRoot .'/NoAuth/images/favicon.png';
@@ -394,3 +394,41 @@ diag "update with attachment";
$m->content_contains('Download favicon.png', 'page has file name');
}
+
+
+my $m2 = RT::Test::Web->new;
+ok $m2->login, 'second login';
+
+diag "update and create";
+{
+ my $ticket = RT::Test->create_ticket(
+ Queue => $queue,
+ Subject => 'Attachments test',
+ Content => 'Some content',
+ );
+
+ $m2->goto_ticket( $ticket->id );
+ $m2->follow_link_ok({text => 'Reply'}, "reply to the ticket");
+ $m2->form_name('TicketUpdate');
+ $m2->field('Attach', LogoFile);
+ $m2->click('AddMoreAttach');
+ is($m2->status, 200, "request successful");
+
+ $m->goto_create_ticket( $queue );
+
+ $m->form_name('TicketCreate');
+ $m->field('Attach', FaviconFile);
+ $m->field('Subject', 'Attachments test');
+ $m->field('Content', 'Some content');
+ $m->submit;
+ is($m->status, 200, "request successful");
+
+ $m->content_lacks('Download bpslogo.png', 'page has file name');
+ $m->content_contains('Download favicon.png', 'page has file name');
+
+ $m2->form_name('TicketUpdate');
+ $m2->click('SubmitTicket');
+ $m2->content_contains('Download bpslogo.png', 'page has file name');
+ $m2->content_lacks('Download favicon.png', 'page has no file name');
+}
+
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list