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

(-)a/t/db_dependent/Circulation.t (-21 / +9 lines)
Lines 1955-1996 subtest 'AddReturn + suspension_chargeperiod' => sub { Link Here
1955
subtest 'CanBookBeIssued + AutoReturnCheckedOutItems' => sub {
1955
subtest 'CanBookBeIssued + AutoReturnCheckedOutItems' => sub {
1956
    plan tests => 2;
1956
    plan tests => 2;
1957
1957
1958
    my $library = $builder->build( { source => 'Branch' } );
1958
    my $library = $builder->build_object( { class => 'Koha::Libraries' } );
1959
    my $patron_category_x = $builder->build_object(
1960
        {
1961
            class => 'Koha::Patron::Categories',
1962
            value => { category_type => 'X' }
1963
        }
1964
    );
1965
1966
    my $patron1 = $builder->build_object(
1959
    my $patron1 = $builder->build_object(
1967
        {
1960
        {
1968
            class => 'Koha::Patrons',
1961
            class => 'Koha::Patrons',
1969
            value  => {
1962
            value => {
1970
                branchcode => $library->{branchcode},
1963
                library      => $library->branchcode,
1971
                firstname => "Happy",
1964
                categorycode => $patron_category->{categorycode}
1972
                surname => "Gilmore",
1973
            }
1965
            }
1974
        }
1966
        }
1975
    );
1967
    );
1976
    my $patron2 = $builder->build_object(
1968
    my $patron2 = $builder->build_object(
1977
        {
1969
        {
1978
            class => 'Koha::Patrons',
1970
            class => 'Koha::Patrons',
1979
            value  => {
1971
            value => {
1980
                branchcode => $library->{branchcode},
1972
                library      => $library->branchcode,
1981
                categorycode => $patron_category_x->categorycode,
1973
                categorycode => $patron_category->{categorycode}
1982
                firstname => "Billy",
1983
                surname => "Madison",
1984
            }
1974
            }
1985
        }
1975
        }
1986
    );
1976
    );
1987
1977
1988
    C4::Context->_new_userenv('xxx');
1978
    t::lib::Mocks::mock_userenv({ branchcode => $library->branchcode });
1989
    C4::Context->set_userenv(0,0,0,'firstname','surname', $library->{branchcode}, 'Random Library', '', '', '');
1990
1979
1991
    my $item = $builder->build_sample_item(
1980
    my $item = $builder->build_sample_item(
1992
        {
1981
        {
1993
            library      => $library->{branchcode},
1982
            library      => $library->branchcode,
1994
        }
1983
        }
1995
    )->unblessed;
1984
    )->unblessed;
1996
1985
1997
- 

Return to bug 24062