LP#1817645: Fix pgtap tests
authorBen Shum <ben@evergreener.net>
Sat, 7 Sep 2019 16:26:14 +0000 (12:26 -0400)
committerBen Shum <ben@evergreener.net>
Sat, 7 Sep 2019 16:26:14 +0000 (12:26 -0400)
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

index 2982d0a..1fc22ec 100644 (file)
@@ -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'
 );