View | Details | Raw Unified | Return to bug 31154
Collapse All | Expand All

(-)a/t/db_dependent/Koha/UI/Form/Builder/Item.t (-2 / +15 lines)
Lines 16-22 Link Here
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
16
# along with Koha; if not, see <http://www.gnu.org/licenses>.
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
use Test::More tests => 8;
19
use Test::More tests => 9;
20
use Data::Dumper qw( Dumper );
20
use Data::Dumper qw( Dumper );
21
use utf8;
21
use utf8;
22
22
Lines 26-31 use Koha::Libraries; Link Here
26
use Koha::MarcSubfieldStructures;
26
use Koha::MarcSubfieldStructures;
27
use Koha::UI::Form::Builder::Item;
27
use Koha::UI::Form::Builder::Item;
28
use t::lib::TestBuilder;
28
use t::lib::TestBuilder;
29
use t::lib::Mocks;
29
30
30
my $schema = Koha::Database->new->schema;
31
my $schema = Koha::Database->new->schema;
31
$schema->storage->txn_begin;
32
$schema->storage->txn_begin;
Lines 334-339 subtest 'ignore_invisible_subfields' => sub { Link Here
334
        undef, 'items.issues not copied if ignore_invisible_subfields is passed' );
335
        undef, 'items.issues not copied if ignore_invisible_subfields is passed' );
335
};
336
};
336
337
338
subtest 'Fix subfill_with_default_values - no biblionumber passed' => sub {
339
    plan tests => 1;
340
341
    t::lib::Mocks::mock_preference('itemcallnumber', '082ab,092ab');
342
    my $item = $builder->build_sample_item;
343
    my $subfields = Koha::UI::Form::Builder::Item->new(
344
        {
345
            item         => $item->unblessed,
346
        }
347
    )->edit_form({ prefill_with_default_values => 1 });
348
    pass();
349
};
350
337
$cache->clear_from_cache("MarcStructure-0-");
351
$cache->clear_from_cache("MarcStructure-0-");
338
$cache->clear_from_cache("MarcStructure-1-");
352
$cache->clear_from_cache("MarcStructure-1-");
339
$cache->clear_from_cache("default_value_for_mod_marc-");
353
$cache->clear_from_cache("default_value_for_mod_marc-");
340
- 

Return to bug 31154