Skip to content

Commit

Permalink
Update test to check for the lock ids
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartskelton committed Mar 19, 2024
1 parent 3a36b23 commit ee541da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<td>
<input type="checkbox" name="name" value="<%= $lock->{name} %>">
</td>
<td>
<td id="lock_id">
<%= $lock->{id} %>
</td>
<td>
Expand Down
2 changes: 2 additions & 0 deletions t/pg_admin.t
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ subtest 'Locks' => sub {
$t->app->minion->lock('bar', 3600);
$t->ua->max_redirects(5);
$t->get_ok('/minion/locks')->status_is(200)->text_like('tbody td a' => qr/bar/);
$t->get_ok('/minion/locks')->status_is(200)->text_like('tbody td#lock_id' => qr/2/);
$t->get_ok('/minion/locks?name=foo')->status_is(200)->text_like('tbody td a' => qr/foo/);
$t->get_ok('/minion/locks?name=foo')->status_is(200)->text_like('tbody td#lock_id' => qr/1/);
$t->post_ok('/minion/locks?_method=DELETE&name=bar')->status_is(200)->text_like('tbody td a' => qr/foo/)
->text_like('.alert-success', qr/All selected named locks released/);
is $t->tx->previous->res->code, 302, 'right status';
Expand Down

0 comments on commit ee541da

Please sign in to comment.