LP#1470957: adjust a previous regression test
[Evergreen.git] / Open-ILS / src / sql / Pg / t / regress / lp1414112_allow_spaces_as_ff_attr_values.pg
1 BEGIN;
2
3 SELECT plan(2);
4
5 INSERT INTO biblio.record_entry (marc, last_xact_id)
6 VALUES (
7     $$<record    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"    xmlns="http://www.loc.gov/MARC21/slim"><leader>00620cam a2200205Ka 4500</leader><controlfield tag="001">1</controlfield><controlfield tag="003">CONS</controlfield><controlfield tag="005">20150113170906.0</controlfield><controlfield tag="008">070101s                            eng d</controlfield><datafield tag="245" ind1=" " ind2=" "><subfield code="a">Harry potter</subfield></datafield><datafield tag="901" ind1=" " ind2=" "><subfield code="a">1</subfield><subfield code="b"></subfield><subfield code="c">1</subfield><subfield code="t">biblio</subfield></datafield></record>$$,
8     'LP#1414112'
9 );
10
11 SELECT ok(attrs ? 'audience', 'audience attribute exists')
12 FROM metabib.record_attr WHERE id = CURRVAL('biblio.record_entry_id_seq');
13
14 SELECT is(
15     ( 
16         SELECT attrs->'date1' 
17         FROM metabib.record_attr 
18         WHERE id = CURRVAL('biblio.record_entry_id_seq')
19     ),
20     '0000',
21     'as of LP#1470957, date1 = "    " normalizes to 0000'
22 )
23 ;
24
25 ROLLBACK;