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

(-)a/t/db_dependent/Circulation.t (-37 / +13 lines)
Lines 1958-1977 subtest 'CanBookBeIssued + AutoReturnCheckedOutItems' => sub { Link Here
1958
    C4::Context->_new_userenv('xxx');
1958
    C4::Context->_new_userenv('xxx');
1959
    C4::Context->set_userenv(0,0,0,'firstname','surname', $library->{branchcode}, 'Random Library', '', '', '');
1959
    C4::Context->set_userenv(0,0,0,'firstname','surname', $library->{branchcode}, 'Random Library', '', '', '');
1960
1960
1961
    my $biblioitem = $builder->build( { source => 'Biblioitem' } );
1961
    my $item = $builder->build_sample_item(
1962
    my $biblionumber = $biblioitem->{biblionumber};
1962
        {
1963
    my $item = $builder->build(
1963
            library      => $library->{branchcode},
1964
        {   source => 'Item',
1965
            value  => {
1966
                homebranch    => $library->{branchcode},
1967
                holdingbranch => $library->{branchcode},
1968
                notforloan    => 0,
1969
                itemlost      => 0,
1970
                withdrawn     => 0,
1971
                biblionumber  => $biblionumber,
1972
            }
1973
        }
1964
        }
1974
    );
1965
    )->unblessed;
1975
1966
1976
    my ( $error, $question, $alerts );
1967
    my ( $error, $question, $alerts );
1977
    my $issue = AddIssue( $patron1->unblessed, $item->{barcode} );
1968
    my $issue = AddIssue( $patron1->unblessed, $item->{barcode} );
Lines 2003-2008 subtest 'AddReturn | is_overdue' => sub { Link Here
2003
    my $item = $builder->build_sample_item(
1994
    my $item = $builder->build_sample_item(
2004
        {
1995
        {
2005
            library      => $library->{branchcode},
1996
            library      => $library->{branchcode},
1997
            replacementprice => 7
2006
        }
1998
        }
2007
    )->unblessed;
1999
    )->unblessed;
2008
2000
Lines 2630-2644 subtest 'Cancel transfers on lost items' => sub { Link Here
2630
    my $library_2 = $builder->build( { source => 'Branch' } );
2622
    my $library_2 = $builder->build( { source => 'Branch' } );
2631
    my $patron_2  = $builder->build( { source => 'Borrower', value => { branchcode => $library_2->{branchcode}, categorycode => $patron_category->{categorycode} } } );
2623
    my $patron_2  = $builder->build( { source => 'Borrower', value => { branchcode => $library_2->{branchcode}, categorycode => $patron_category->{categorycode} } } );
2632
    my $biblio = $builder->build_sample_biblio({branchcode => $library->{branchcode}});
2624
    my $biblio = $builder->build_sample_biblio({branchcode => $library->{branchcode}});
2633
    my $item   = $builder->build_sample_item(
2625
    my $item   = $builder->build_sample_item({
2634
        {
2626
        biblionumber  => $biblio->biblionumber,
2635
            class => 'Koha::Items',
2627
        library    => $library_1->{branchcode},
2636
            value => {
2628
    });
2637
                biblionumber => $biblio->biblionumber,
2638
                library      => $library_1->{branchcode},
2639
            }
2640
        }
2641
    );
2642
2629
2643
    set_userenv( $library_2 );
2630
    set_userenv( $library_2 );
2644
    my $reserve_id = AddReserve(
2631
    my $reserve_id = AddReserve(
Lines 3114-3135 subtest 'Incremented fee tests' => sub { Link Here
3114
        }
3101
        }
3115
    )->store;
3102
    )->store;
3116
3103
3117
    my $biblioitem = $builder->build( { source => 'Biblioitem' } );
3104
    my $item = $builder->build_sample_item(
3118
    my $item = $builder->build_object(
3119
        {
3105
        {
3120
            class => 'Koha::Items',
3106
            library  => $library->{branchcode},
3121
            value => {
3107
            itype    => $itemtype->id,
3122
                homebranch       => $library->id,
3123
                holdingbranch    => $library->id,
3124
                notforloan       => 0,
3125
                itemlost         => 0,
3126
                withdrawn        => 0,
3127
                itype            => $itemtype->id,
3128
                biblionumber     => $biblioitem->{biblionumber},
3129
                biblioitemnumber => $biblioitem->{biblioitemnumber},
3130
            }
3131
        }
3108
        }
3132
    )->store;
3109
    );
3133
3110
3134
    is( $itemtype->rentalcharge_daily, '1.000000', 'Daily rental charge stored and retreived correctly' );
3111
    is( $itemtype->rentalcharge_daily, '1.000000', 'Daily rental charge stored and retreived correctly' );
3135
    is( $item->effective_itemtype, $itemtype->id, "Itemtype set correctly for item");
3112
    is( $item->effective_itemtype, $itemtype->id, "Itemtype set correctly for item");
3136
- 

Return to bug 21985