5 INSERT INTO config.bib_source (id, source )
6 VALUES (999999998, 'test source');
7 INSERT INTO rating.badge (id, name, scope, popularity_parameter, src_filter)
8 VALUES (999999998, 'test badge', 1, 15, 999999998 );
10 INSERT INTO biblio.record_entry (id, source, last_xact_id, marc)
11 VALUES (999999998, 999999998, 'pgtap', $$<record
12 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
13 xsi:schemaLocation="http://www.loc.gov/MARC21/slim http://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd"
14 xmlns="http://www.loc.gov/MARC21/slim">
15 <leader>00531nam a2200157 a 4500</leader>
16 <controlfield tag="005">20080729170300.0</controlfield>
17 <controlfield tag="008"> t19981999enka 0 eng </controlfield>
18 <datafield tag="245" ind1="1" ind2="4">
19 <subfield code="a">test record</subfield>
23 SELECT rating.recalculate_badge_score(999999998);
27 'LP#1549505: Badge caclulation framework is operational'
29 FROM rating.record_badge_score
30 WHERE record = 999999998
31 AND badge = 999999998;