From ee541da3b4bffaf8696d29a6e0ae2145d2695c1f Mon Sep 17 00:00:00 2001 From: Stuart Skelton Date: Tue, 19 Mar 2024 11:50:03 +0000 Subject: [PATCH] Update test to check for the lock ids --- .../Plugin/Minion/resources/templates/minion/locks.html.ep | 2 +- t/pg_admin.t | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep b/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep index a44f0a5..8210f60 100644 --- a/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep +++ b/lib/Mojolicious/Plugin/Minion/resources/templates/minion/locks.html.ep @@ -38,7 +38,7 @@ - + <%= $lock->{id} %> diff --git a/t/pg_admin.t b/t/pg_admin.t index a9b2fa7..5218436 100644 --- a/t/pg_admin.t +++ b/t/pg_admin.t @@ -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';