|
Lines 915-920
subtest 'get_marc_components() tests' => sub {
Link Here
|
| 915 |
subtest 'get_components_query' => sub { |
915 |
subtest 'get_components_query' => sub { |
| 916 |
plan tests => 12; |
916 |
plan tests => 12; |
| 917 |
|
917 |
|
|
|
918 |
$schema->storage->txn_begin; |
| 919 |
|
| 918 |
my $biblio = $builder->build_sample_biblio(); |
920 |
my $biblio = $builder->build_sample_biblio(); |
| 919 |
my $biblionumber = $biblio->biblionumber; |
921 |
my $biblionumber = $biblio->biblionumber; |
| 920 |
my $record = $biblio->metadata->record; |
922 |
my $record = $biblio->metadata->record; |
|
Lines 959-969
subtest 'get_components_query' => sub {
Link Here
|
| 959 |
is( $comp_sort, "title_asc", "$engine: UseControlNumber enabled with MarcOrgCode sort if correct" ); |
961 |
is( $comp_sort, "title_asc", "$engine: UseControlNumber enabled with MarcOrgCode sort if correct" ); |
| 960 |
$record->delete_field($marc_003_field); |
962 |
$record->delete_field($marc_003_field); |
| 961 |
} |
963 |
} |
|
|
964 |
|
| 965 |
$schema->storage->txn_rollback; |
| 966 |
|
| 962 |
}; |
967 |
}; |
| 963 |
|
968 |
|
| 964 |
subtest 'get_volumes_query' => sub { |
969 |
subtest 'get_volumes_query' => sub { |
| 965 |
plan tests => 3; |
970 |
plan tests => 3; |
| 966 |
|
971 |
|
|
|
972 |
$schema->storage->txn_begin; |
| 973 |
|
| 967 |
my $biblio = $builder->build_sample_biblio(); |
974 |
my $biblio = $builder->build_sample_biblio(); |
| 968 |
my $biblionumber = $biblio->biblionumber; |
975 |
my $biblionumber = $biblio->biblionumber; |
| 969 |
my $record = $biblio->metadata->record; |
976 |
my $record = $biblio->metadata->record; |
|
Lines 1003-1008
subtest 'get_volumes_query' => sub {
Link Here
|
| 1003 |
"(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") NOT (bib-level:a OR bib-level:b))", |
1010 |
"(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") NOT (bib-level:a OR bib-level:b))", |
| 1004 |
"UseControlNumber enabled with MarcOrgCode" |
1011 |
"UseControlNumber enabled with MarcOrgCode" |
| 1005 |
); |
1012 |
); |
|
|
1013 |
|
| 1014 |
$schema->storage->txn_rollback; |
| 1015 |
|
| 1006 |
}; |
1016 |
}; |
| 1007 |
|
1017 |
|
| 1008 |
subtest 'generate_marc_host_field' => sub { |
1018 |
subtest 'generate_marc_host_field' => sub { |
|
Lines 1811-1816
subtest 'item_groups() tests' => sub {
Link Here
|
| 1811 |
subtest 'normalized_isbn' => sub { |
1821 |
subtest 'normalized_isbn' => sub { |
| 1812 |
plan tests => 1; |
1822 |
plan tests => 1; |
| 1813 |
|
1823 |
|
|
|
1824 |
$schema->storage->txn_begin; |
| 1825 |
|
| 1814 |
# We will move the tests from GetNormalizedISBN here when it will get replaced |
1826 |
# We will move the tests from GetNormalizedISBN here when it will get replaced |
| 1815 |
my $biblio = $builder->build_sample_biblio(); |
1827 |
my $biblio = $builder->build_sample_biblio(); |
| 1816 |
$biblio->biblioitem->set( { isbn => '9781250067128 | 125006712X' } )->store; |
1828 |
$biblio->biblioitem->set( { isbn => '9781250067128 | 125006712X' } )->store; |
|
Lines 1818-1828
subtest 'normalized_isbn' => sub {
Link Here
|
| 1818 |
$biblio->normalized_isbn, C4::Koha::GetNormalizedISBN( $biblio->biblioitem->isbn ), |
1830 |
$biblio->normalized_isbn, C4::Koha::GetNormalizedISBN( $biblio->biblioitem->isbn ), |
| 1819 |
'normalized_isbn is a wrapper around C4::Koha::GetNormalizedISBN' |
1831 |
'normalized_isbn is a wrapper around C4::Koha::GetNormalizedISBN' |
| 1820 |
); |
1832 |
); |
|
|
1833 |
|
| 1834 |
$schema->storage->txn_rollback; |
| 1835 |
|
| 1821 |
}; |
1836 |
}; |
| 1822 |
|
1837 |
|
| 1823 |
subtest 'normalized_upc' => sub { |
1838 |
subtest 'normalized_upc' => sub { |
| 1824 |
plan tests => 1; |
1839 |
plan tests => 1; |
| 1825 |
|
1840 |
|
|
|
1841 |
$schema->storage->txn_begin; |
| 1842 |
|
| 1826 |
# We will move the tests from GetNormalizedUPC here when it will get replaced |
1843 |
# We will move the tests from GetNormalizedUPC here when it will get replaced |
| 1827 |
# Note that only a single test exist and it's not really meaningful... |
1844 |
# Note that only a single test exist and it's not really meaningful... |
| 1828 |
my $biblio = $builder->build_sample_biblio(); |
1845 |
my $biblio = $builder->build_sample_biblio(); |
|
Lines 1830-1840
subtest 'normalized_upc' => sub {
Link Here
|
| 1830 |
$biblio->normalized_upc, C4::Koha::GetNormalizedUPC( $biblio->metadata->record ), |
1847 |
$biblio->normalized_upc, C4::Koha::GetNormalizedUPC( $biblio->metadata->record ), |
| 1831 |
'normalized_upc is a wrapper around C4::Koha::GetNormalizedUPC' |
1848 |
'normalized_upc is a wrapper around C4::Koha::GetNormalizedUPC' |
| 1832 |
); |
1849 |
); |
|
|
1850 |
|
| 1851 |
$schema->storage->txn_rollback; |
| 1852 |
|
| 1833 |
}; |
1853 |
}; |
| 1834 |
|
1854 |
|
| 1835 |
subtest 'normalized_oclc' => sub { |
1855 |
subtest 'normalized_oclc' => sub { |
| 1836 |
plan tests => 1; |
1856 |
plan tests => 1; |
| 1837 |
|
1857 |
|
|
|
1858 |
$schema->storage->txn_begin; |
| 1859 |
|
| 1838 |
# We will move the tests from GetNormalizedOCLC here when it will get replaced |
1860 |
# We will move the tests from GetNormalizedOCLC here when it will get replaced |
| 1839 |
# Note that only a single test exist and it's not really meaningful... |
1861 |
# Note that only a single test exist and it's not really meaningful... |
| 1840 |
my $biblio = $builder->build_sample_biblio(); |
1862 |
my $biblio = $builder->build_sample_biblio(); |
|
Lines 1842-1847
subtest 'normalized_oclc' => sub {
Link Here
|
| 1842 |
$biblio->normalized_oclc, C4::Koha::GetNormalizedOCLCNumber( $biblio->metadata->record ), |
1864 |
$biblio->normalized_oclc, C4::Koha::GetNormalizedOCLCNumber( $biblio->metadata->record ), |
| 1843 |
'normalized_oclc is a wrapper around C4::Koha::GetNormalizedOCLCNumber' |
1865 |
'normalized_oclc is a wrapper around C4::Koha::GetNormalizedOCLCNumber' |
| 1844 |
); |
1866 |
); |
|
|
1867 |
|
| 1868 |
$schema->storage->txn_rollback; |
| 1869 |
|
| 1845 |
}; |
1870 |
}; |
| 1846 |
|
1871 |
|
| 1847 |
subtest 'opac_suppressed() tests' => sub { |
1872 |
subtest 'opac_suppressed() tests' => sub { |
|
Lines 1885-1898
subtest 'opac_suppressed() tests' => sub {
Link Here
|
| 1885 |
subtest 'ratings' => sub { |
1910 |
subtest 'ratings' => sub { |
| 1886 |
plan tests => 1; |
1911 |
plan tests => 1; |
| 1887 |
|
1912 |
|
|
|
1913 |
$schema->storage->txn_begin; |
| 1914 |
|
| 1888 |
# See t/db_dependent/Koha/Ratings.t |
1915 |
# See t/db_dependent/Koha/Ratings.t |
| 1889 |
ok(1); |
1916 |
ok(1); |
|
|
1917 |
|
| 1918 |
$schema->storage->txn_rollback; |
| 1890 |
}; |
1919 |
}; |
| 1891 |
|
1920 |
|
| 1892 |
subtest 'opac_summary_html' => sub { |
1921 |
subtest 'opac_summary_html' => sub { |
| 1893 |
|
1922 |
|
| 1894 |
plan tests => 2; |
1923 |
plan tests => 2; |
| 1895 |
|
1924 |
|
|
|
1925 |
$schema->storage->txn_begin; |
| 1926 |
|
| 1896 |
my $author = 'my author'; |
1927 |
my $author = 'my author'; |
| 1897 |
my $title = 'my title'; |
1928 |
my $title = 'my title'; |
| 1898 |
my $isbn = '9781250067128 | 125006712X'; |
1929 |
my $isbn = '9781250067128 | 125006712X'; |
|
Lines 1911-1916
subtest 'opac_summary_html' => sub {
Link Here
|
| 1911 |
sprintf( 'Replace %s, %s, %s AND %s please', $author, $title, $biblio->normalized_isbn, $biblio->biblionumber ), |
1942 |
sprintf( 'Replace %s, %s, %s AND %s please', $author, $title, $biblio->normalized_isbn, $biblio->biblionumber ), |
| 1912 |
'opac_summary_html replaces the different patterns' |
1943 |
'opac_summary_html replaces the different patterns' |
| 1913 |
); |
1944 |
); |
|
|
1945 |
|
| 1946 |
$schema->storage->txn_rollback; |
| 1947 |
|
| 1914 |
}; |
1948 |
}; |
| 1915 |
|
1949 |
|
| 1916 |
subtest 'can_be_edited() tests' => sub { |
1950 |
subtest 'can_be_edited() tests' => sub { |
| 1917 |
- |
|
|