first pass RT4 merge, RT#13852
[freeside.git] / rt / t / web / ticket_modify_all.t
1 use strict;
2 use warnings;
3
4 use RT::Test tests => 15;
5
6 my $ticket = RT::Test->create_ticket(
7     Subject => 'test bulk update',
8     Queue   => 1,
9 );
10
11 my ( $url, $m ) = RT::Test->started_ok;
12 ok( $m->login, 'logged in' );
13
14 $m->get_ok( $url . "/Ticket/ModifyAll.html?id=" . $ticket->id );
15
16 $m->submit_form(
17     form_number => 3,
18     fields      => { 'UpdateContent' => 'this is update content' },
19     button      => 'SubmitTicket',
20 );
21
22 $m->content_contains("Message recorded", 'updated ticket');
23 $m->content_lacks("this is update content", 'textarea is clear');
24
25 $m->get_ok($url . '/Ticket/Display.html?id=' . $ticket->id );
26 $m->content_contains("this is update content", 'updated content in display page');
27
28 # NOTE http://issues.bestpractical.com/Ticket/Display.html?id=18284
29 RT::Test->stop_server;
30 RT->Config->Set(AutocompleteOwners => 1);
31 ($url, $m) = RT::Test->started_ok;
32 $m->login;
33
34 $m->get_ok($url . '/Ticket/ModifyAll.html?id=' . $ticket->id);
35
36 $m->form_name('TicketModifyAll');
37 $m->field(Owner => 'root');
38 $m->click('SubmitTicket');
39
40 $m->form_name('TicketModifyAll');
41 is($m->value('Owner'), 'root', 'owner was successfully changed to root');
42
43 # XXX TODO test other parts, i.e. basic, dates, people and links
44