Skip to content

Commit

Permalink
more consistent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 11, 2017
1 parent 6d766d3 commit 16e7276
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions t/pg_admin.t
Expand Up @@ -63,9 +63,17 @@ $t->get_ok('/minion/locks')->status_is(200)->text_like('tbody td a' => qr/bar/);
$t->get_ok('/minion/locks?name=foo')->status_is(200)
->text_like('tbody td a' => qr/foo/);
$t->post_ok('/minion/locks?_method=DELETE&name=bar')->status_is(200)
->text_like('tbody td a' => qr/foo/);
->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';
like $t->tx->previous->res->headers->location, qr/locks/,
'right "Location" value';
$t->post_ok('/minion/locks?_method=DELETE&name=foo')->status_is(200)
->element_exists_not('tbody td a');
->element_exists_not('tbody td a')
->text_like('.alert-success', qr/All selected named locks released/);
is $t->tx->previous->res->code, 302, 'right status';
like $t->tx->previous->res->headers->location, qr/locks/,
'right "Location" value';

# Manage jobs
is app->minion->job($finished)->info->{state}, 'finished', 'right state';
Expand Down

0 comments on commit 16e7276

Please sign in to comment.