LP#1470957: adjust a previous regression test
authorGalen Charlton <gmc@esilibrary.com>
Wed, 2 Mar 2016 22:07:28 +0000 (17:07 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 2 Mar 2016 22:07:28 +0000 (17:07 -0500)
Now that there are normalizers set for pubdate,
008/Date1 = "    " is now normalized to "0000".

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/t/regress/lp1414112_allow_spaces_as_ff_attr_values.pg

index 62d6dbe..0996e57 100644 (file)
@@ -11,7 +11,15 @@ VALUES (
 SELECT ok(attrs ? 'audience', 'audience attribute exists')
 FROM metabib.record_attr WHERE id = CURRVAL('biblio.record_entry_id_seq');
 
-SELECT ok(NOT attrs ? 'date1' , 'date1 attribute does not exist')
-FROM metabib.record_attr WHERE id = CURRVAL('biblio.record_entry_id_seq');
+SELECT is(
+    ( 
+        SELECT attrs->'date1' 
+        FROM metabib.record_attr 
+        WHERE id = CURRVAL('biblio.record_entry_id_seq')
+    ),
+    '0000',
+    'as of LP#1470957, date1 = "    " normalizes to 0000'
+)
+;
 
 ROLLBACK;