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

(-)a/t/db_dependent/Letters.t (-2 / +10 lines)
Lines 1032-1041 subtest 'Test guarantor handling in SendQueuedMessages' => sub { Link Here
1032
    plan tests => 19;
1032
    plan tests => 19;
1033
1033
1034
    t::lib::Mocks::mock_preference( 'borrowerRelationship', 'test' );
1034
    t::lib::Mocks::mock_preference( 'borrowerRelationship', 'test' );
1035
    t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 1 );
1035
1036
1036
    my $patron     = Koha::Patrons->find($borrowernumber);
1037
    my $patron     = Koha::Patrons->find($borrowernumber);
1037
    my $guarantor1 = $builder->build_object( { class => 'Koha::Patrons', value => { email => 'g1@email.com' } } );
1038
1038
    my $guarantor2 = $builder->build_object( { class => 'Koha::Patrons', value => { email => 'g2@email.com' } } );
1039
    my $patron_category =
1040
        $builder->build( { source => 'Category', value => { category_type => 'A', can_be_guarantee => 0 } } )
1041
        ->{categorycode};
1042
    my $guarantor1 = $builder->build_object(
1043
        { class => 'Koha::Patrons', value => { email => 'g1@email.com', categorycode => $patron_category } } );
1044
    my $guarantor2 = $builder->build_object(
1045
        { class => 'Koha::Patrons', value => { email => 'g2@email.com', categorycode => $patron_category } } );
1046
1039
    $patron->add_guarantor( { guarantor_id => $guarantor1->borrowernumber, relationship => 'test' } );
1047
    $patron->add_guarantor( { guarantor_id => $guarantor1->borrowernumber, relationship => 'test' } );
1040
    $patron->add_guarantor( { guarantor_id => $guarantor2->borrowernumber, relationship => 'test' } );
1048
    $patron->add_guarantor( { guarantor_id => $guarantor2->borrowernumber, relationship => 'test' } );
1041
1049
(-)a/t/db_dependent/api/v1/erm_users.t (-2 / +6 lines)
Lines 31-36 my $builder = t::lib::TestBuilder->new; Link Here
31
31
32
my $t = Test::Mojo->new('Koha::REST::V1');
32
my $t = Test::Mojo->new('Koha::REST::V1');
33
t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 );
33
t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 );
34
t::lib::Mocks::mock_preference( 'ChildNeedsGuarantor', 0 );
34
35
35
subtest 'list() tests' => sub {
36
subtest 'list() tests' => sub {
36
37
Lines 38-44 subtest 'list() tests' => sub { Link Here
38
39
39
    $schema->storage->txn_begin;
40
    $schema->storage->txn_begin;
40
41
41
    Koha::Patrons->search->update( { flags => 0 } );
42
    my $patron_category =
43
        $builder->build( { source => 'Category', value => { category_type => 'A', can_be_guarantee => 0 } } )
44
        ->{categorycode};
45
46
    Koha::Patrons->search->update( { flags => 0, categorycode => $patron_category } );
42
    $schema->resultset('UserPermission')->delete;
47
    $schema->resultset('UserPermission')->delete;
43
48
44
    my $librarian = $builder->build_object(
49
    my $librarian = $builder->build_object(
45
- 

Return to bug 12133