Skip to content

Commit 51b36f4

Browse files
author
Mike.lifeguard
committed
Fix testing of minor edits
1 parent b1c30c5 commit 51b36f4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

t/04-edit.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ my $rand = rand();
2626
my $status = $bot->edit({
2727
page => $title,
2828
text => $rand,
29-
summary => $agent,
29+
summary => $agent . ' (should be a minor edit)',
30+
minor => 1,
3031
});
3132

3233
SKIP: {
@@ -42,7 +43,6 @@ SKIP: {
4243
text => $rand2,
4344
section => 'new',
4445
summary => $agent,
45-
minor => 1,
4646
});
4747
$bot->purge_page($title);
4848
$is = $bot->get_text($title);
@@ -59,8 +59,8 @@ END
5959
or diag explain $status;
6060

6161
if ($login_data) {
62-
my @hist = $bot->get_history($title, 1);
63-
ok $hist[0]->{minor}, 'Minor edit' or diag explain $hist[0];
62+
my @hist = $bot->get_history($title, 2);
63+
ok $hist[1]->{minor}, 'Minor edit' or diag explain \@hist;
6464

6565
$bot->edit({
6666
page => $title,
@@ -69,6 +69,6 @@ END
6969
minor => 0,
7070
});
7171
@hist = $bot->get_history($title, 1);
72-
ok !$hist[0]->{minor}, 'Not a minor edit' or diag explain $hist[0];
72+
ok !$hist[0]->{minor}, 'Not a minor edit' or diag explain \@hist;
7373
}
7474
}

0 commit comments

Comments
 (0)