Bug 22483: (follow-up) Fix wrong tests higlighted by bug
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 8 Mar 2019 16:45:03 +0000 (13:45 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Fri, 8 Mar 2019 18:26:05 +0000 (15:26 -0300)
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

t/db_dependent/api/v1/patrons_password.t

index b704761..10b1821 100644 (file)
@@ -141,7 +141,7 @@ subtest 'set_public() (unprivileged user tests)' => sub {
 
     my $tx = $t->ua->build_tx(
               POST => "/api/v1/public/patrons/"
-            . $other_patron->id
+            . $patron->id
             . "/password" => json => {
             password          => $new_password,
             password_repeated => $new_password,
@@ -175,8 +175,8 @@ subtest 'set_public() (unprivileged user tests)' => sub {
     $tx->req->env( { REMOTE_ADDR => '127.0.0.1' } );
     $t->request_ok($tx)
       ->status_is(403)
-      ->json_is({
-          error => "Changing other patron's password is forbidden"
+      ->json_has({
+          error => "Authorization failure. Missing required permission(s)."
         });
 
     $tx = $t->ua->build_tx(