[Rt-commit] rt branch, 4.4/shredder-user-uid, repushed
Craig Kaiser
craig at bestpractical.com
Thu Jun 14 12:13:03 EDT 2018
The branch 4.4/shredder-user-uid was deleted and repushed:
was abd248a8882a7c5d997b4097dc6b3aae0cee10f4
now 29a6fee2c3bd7e3a711949c1503a7f38ef701b19
1: 6764e79e1 ! 1: db515611a Add test to hit shredder web UI
@@ -32,16 +32,68 @@
+}
+
+{
-+ $agent->get($baseurl . '/Admin/Tools/Shredder/?Plugin=Tickets&Tickets%3Aquery=id%3D1&Search=Search');
++ $agent->get($baseurl . '/Admin/Tools/Shredder/');
++ $agent->submit_form(
++ form_id => 'shredder-search-form',
++ fields => { Plugin => 'Tickets'},
++ );
+
-+ # Select the ticket object and wipe it out
-+ $agent->form_id('shredder-search-form');
-+ $agent->current_form->find_input('WipeoutObject')->check;
-+ $agent->click_button(name => 'Wipeout');
++ $agent->submit_form(
++ form_id => 'shredder-search-form',
++ fields => {
++ 'Tickets:query' => 'id=' . $ticket_id,
++ },
++ button => 'Search',
++ );
++
++ $agent->submit_form(
++ form_id => 'shredder-search-form',
++ fields => {
++ 'WipeoutObject' => 'RT::Ticket-example.com-1',
++ },
++ button => 'Wipeout',
++ );
+
+ my $ticket = RT::Ticket->new(RT->SystemUser);
+ my ($ret, $msg) = $ticket->Load($ticket_id);
-+ is ( $ret, undef, 'Ticket successfully deleted' );
++
++ ok !$ret, 'Ticket successfully shredded';
++}
++
++# Shred RT::User
++{
++ my $user = RT::User->new(RT->SystemUser);
++ my ($ret, $msg) = $user->LoadOrCreateByEmail('test at example.com');
++ ok $ret;
++
++ my $id = $user->id;
++ ok $id;
++
++ $agent->get($baseurl . '/Admin/Tools/Shredder/');
++ $agent->submit_form(
++ form_id => 'shredder-search-form',
++ fields => { Plugin => 'Users'},
++ );
++
++ $agent->submit_form(
++ form_id => 'shredder-search-form',
++ fields => {
++ 'Users:email' => 'test at example.com',
++ 'Users:status' => 'Enabled',
++ },
++ button => 'Search',
++ );
++
++ $agent->submit_form(
++ form_id => 'shredder-search-form',
++ fields => {
++ 'WipeoutObject' => 'RT::User-test at example.com',
++ },
++ button => 'Wipeout',
++ );
++
++ ($ret, $msg) = $user->Load($id);
++ ok !$ret, 'User successfully shredded';
+}
+
+done_testing();
2: abd248a88 < -: ------- Restrict Name checks to RT::User objects when shredding
-: ------- > 2: 29a6fee2c Restrict Name checks to RT::User objects when shredding
More information about the rt-commit
mailing list