X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fweb%2Fticket_modify_all.t;h=6b85d98cfa73141c0823489ee96e3d5834b59d38;hb=e131b1f71f08b69abb832c1687d1f29682d171f8;hp=6d19b28e467da13a53bfd126013401b74ff975eb;hpb=d05d7346bb2387fd9d0354923d577275c5c7f019;p=freeside.git diff --git a/rt/t/web/ticket_modify_all.t b/rt/t/web/ticket_modify_all.t index 6d19b28e4..6b85d98cf 100644 --- a/rt/t/web/ticket_modify_all.t +++ b/rt/t/web/ticket_modify_all.t @@ -1,13 +1,15 @@ use strict; use warnings; -use RT::Test tests => 22; +use RT::Test tests => undef; my $ticket = RT::Test->create_ticket( Subject => 'test bulk update', Queue => 1, ); +RT->Config->Set(AutocompleteOwners => 1); + my ( $url, $m ) = RT::Test->started_ok; ok( $m->login, 'logged in' ); @@ -19,18 +21,12 @@ $m->submit_form( button => 'SubmitTicket', ); -$m->content_contains("Message recorded", 'updated ticket'); +$m->content_contains("Comments added", 'updated ticket'); $m->content_lacks("this is update content", 'textarea is clear'); $m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id ); $m->content_contains("this is update content", 'updated content in display page'); -# NOTE http://issues.bestpractical.com/Ticket/Display.html?id=18284 -RT::Test->stop_server; -RT->Config->Set(AutocompleteOwners => 1); -($url, $m) = RT::Test->started_ok; -$m->login; - $m->get_ok($url . '/Ticket/ModifyAll.html?id=' . $ticket->id); $m->form_name('TicketModifyAll'); @@ -57,10 +53,18 @@ $m->field('Told_Date' => "2015-01-01 00:00:00"); $m->click('SubmitTicket'); $m->text_contains("Last Contact: (Thu Jan 01 00:00:00 2015)", 'told date successfully updated'); -$m->form_name('TicketModifyAll'); -$m->field('Due_Date' => "2016-01-01 00:00:00"); -$m->click('SubmitTicket'); -$m->text_contains("Due: (Fri Jan 01 00:00:00 2016)", 'due date successfully updated'); +for my $unset ("0", "-", " ") { + $m->form_name('TicketModifyAll'); + $m->field('Due_Date' => "2016-01-01 00:00:00"); + $m->click('SubmitTicket'); + $m->text_contains("Due: (Fri Jan 01 00:00:00 2016)", 'due date successfully updated'); + + $m->form_name('TicketModifyAll'); + $m->field('Due_Date' => $unset); + $m->click('SubmitTicket'); + $m->text_contains("Due: (Not set)", "due date successfully cleared with '$unset'"); + $m->warning_like(qr/Couldn't parse date '-'/) if $unset eq "-"; +} $m->get( $url . '/Ticket/ModifyAll.html?id=' . $ticket->id ); $m->form_name('TicketModifyAll'); @@ -76,8 +80,9 @@ $m->field(WatcherTypeEmail => 'Requestor'); $m->field(WatcherAddressEmail => 'root@localhost'); $m->click('SubmitTicket'); $m->text_contains( - "root is already a Requestor for this ticket", + "root is already a Requestor", 'no duplicate watchers', ); -# XXX TODO test other parts, i.e. links +undef $m; +done_testing;