From 1421240a4a4bf7daf8578c1a1e21cd51b703603a Mon Sep 17 00:00:00 2001
From: Ben Shum <ben@evergreener.net>
Date: Sat, 7 Sep 2019 12:26:14 -0400
Subject: [PATCH] LP#1817645: Fix pgtap tests

There was a missing closing parenthesis on the pgtap tests from
this new feature.

Also, one of the comparisons had the wrong value matching and it
failed to pass. Inactive patrons return "not_found" rather than
"blocked" apparently.

Signed-off-by: Ben Shum <ben@evergreener.net>
---
 Open-ILS/src/sql/Pg/live_t/lp1817645-remoteauth.pg | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Open-ILS/src/sql/Pg/live_t/lp1817645-remoteauth.pg b/Open-ILS/src/sql/Pg/live_t/lp1817645-remoteauth.pg
index 2982d0a3db..1fc22ec89f 100644
--- a/Open-ILS/src/sql/Pg/live_t/lp1817645-remoteauth.pg
+++ b/Open-ILS/src/sql/Pg/live_t/lp1817645-remoteauth.pg
@@ -17,43 +17,43 @@ SELECT isnt_empty(
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393000')),
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393000'))),
   'not_found',
   'Confirm remoteauth test for nonexistent patron'
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393001')),
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393001'))),
   'expired',
   'Confirm remoteauth test for expired patron'
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393002')),
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393002'))),
   'not_found',
   'Confirm remoteauth test for deleted patron'
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393003')),
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393003'))),
   'blocked',
   'Confirm remoteauth test for barred patron'
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393004')),
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393004'))),
   'success',
   'Confirm remoteauth test for valid patron'
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393005')),
-  'blocked',
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393005'))),
+  'not_found',
   'Confirm remoteauth test for inactive patron'
 );
 
 SELECT is(
-  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393100')),
+  (SELECT * FROM actor.permit_remoteauth('Basic', (SELECT id FROM actor.usr WHERE usrname = '99999393100'))),
   'not_found',
   'Confirm remoteauth test for external patron'
 );
-- 
2.11.0