Lines 167-173
subtest "GetMarcFromKohaField" => sub {
Link Here
|
167 |
}; |
167 |
}; |
168 |
|
168 |
|
169 |
subtest "Authority creation with default linker" => sub { |
169 |
subtest "Authority creation with default linker" => sub { |
170 |
plan tests => 2; |
170 |
plan tests => 4; |
171 |
# Automatic authority creation |
171 |
# Automatic authority creation |
172 |
t::lib::Mocks::mock_preference('LinkerModule', 'Default'); |
172 |
t::lib::Mocks::mock_preference('LinkerModule', 'Default'); |
173 |
t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 1); |
173 |
t::lib::Mocks::mock_preference('BiblioAddsAuthorities', 1); |
Lines 188-193
subtest "Authority creation with default linker" => sub {
Link Here
|
188 |
my ($num_changed,$results) = LinkBibHeadingsToAuthorities($linker, $marc_record, "",undef); |
188 |
my ($num_changed,$results) = LinkBibHeadingsToAuthorities($linker, $marc_record, "",undef); |
189 |
is( $num_changed, 0, "We shouldn't link or create a new record"); |
189 |
is( $num_changed, 0, "We shouldn't link or create a new record"); |
190 |
ok( !defined $results->{added}, "If we have multiple matches, we shouldn't create a new record"); |
190 |
ok( !defined $results->{added}, "If we have multiple matches, we shouldn't create a new record"); |
|
|
191 |
|
192 |
($num_changed,$results) = LinkBibHeadingsToAuthorities($linker, $marc_record, "",undef); |
193 |
is( $num_changed, 0, "We shouldn't link or create a new record using cached result"); |
194 |
ok( !defined $results->{added}, "If we have multiple matches, we shouldn't create a new record on second instance"); |
191 |
}; |
195 |
}; |
192 |
|
196 |
|
193 |
|
197 |
|
194 |
- |
|
|