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

(-)a/t/db_dependent/ArticleRequests.t (-5 / +8 lines)
Lines 71-82 my $patron_2 = $builder->build_object( { class => 'Koha::Patrons', value => { fl Link Here
71
# store
71
# store
72
Koha::Notice::Messages->delete;
72
Koha::Notice::Messages->delete;
73
my $article_request_title = 'an article request title';
73
my $article_request_title = 'an article request title';
74
my $article_request       = Koha::ArticleRequest->new(
74
my $article_request = $builder->build_object(
75
    {
75
    {
76
        borrowernumber => $patron->id,
76
        class => 'Koha::ArticleRequests',
77
        biblionumber   => $item->biblionumber,
77
        value => {
78
        itemnumber     => $item->itemnumber,
78
            borrowernumber => $patron->id,
79
        title          => $article_request_title,
79
            biblionumber   => $item->biblionumber,
80
            itemnumber     => $item->itemnumber,
81
            title          => $article_request_title,
82
        }
80
    }
83
    }
81
)->request();
84
)->request();
82
85
(-)a/t/db_dependent/Koha/ArticleRequest.t (-14 / +27 lines)
Lines 46-55 subtest 'request() tests' => sub { Link Here
46
46
47
    my $ar_module = mock_article_request_module();
47
    my $ar_module = mock_article_request_module();
48
48
49
    my $ar = Koha::ArticleRequest->new(
49
    my $ar = $builder->build_object(
50
        {
50
        {
51
            borrowernumber => $patron->id,
51
            class => 'Koha::ArticleRequests',
52
            biblionumber   => $item->biblionumber,
52
            value => {
53
                borrowernumber => $patron->id,
54
                biblionumber   => $item->biblionumber,
55
                debit_id       => undef,
56
            }
53
        }
57
        }
54
    );
58
    );
55
59
Lines 67-77 subtest 'request() tests' => sub { Link Here
67
    # set a fee amount
71
    # set a fee amount
68
    $amount = 10;
72
    $amount = 10;
69
73
70
    $ar = Koha::ArticleRequest->new(
74
    $ar = $builder->build_object(
71
        {
75
        {
72
            borrowernumber => $patron->id,
76
            class => 'Koha::ArticleRequests',
73
            biblionumber   => $item->biblionumber,
77
            value => {
74
            itemnumber     => $item->id,
78
                borrowernumber => $patron->id,
79
                biblionumber   => $item->biblionumber,
80
                itemnumber     => $item->id,
81
            }
75
        }
82
        }
76
    );
83
    );
77
84
Lines 101-110 subtest 'set_pending() tests' => sub { Link Here
101
108
102
    my $ar_module = mock_article_request_module();
109
    my $ar_module = mock_article_request_module();
103
110
104
    my $ar = Koha::ArticleRequest->new(
111
    my $ar = $builder->build_object(
105
        {
112
        {
106
            borrowernumber => $patron->id,
113
            class => 'Koha::ArticleRequests',
107
            biblionumber   => $biblio->id,
114
            value => {
115
                borrowernumber => $patron->id,
116
                biblionumber   => $biblio->id,
117
            }
108
        }
118
        }
109
    );
119
    );
110
120
Lines 176-186 subtest 'cancel() tests' => sub { Link Here
176
186
177
    my $ar_module = mock_article_request_module();
187
    my $ar_module = mock_article_request_module();
178
188
179
    my $ar = Koha::ArticleRequest->new(
189
    my $ar = $builder->build_object(
180
        {
190
        {
181
            borrowernumber => $patron->id,
191
            class => 'Koha::ArticleRequests',
182
            biblionumber   => $item->biblionumber,
192
            value => {
183
            itemnumber     => $item->id,
193
                borrowernumber => $patron->id,
194
                biblionumber   => $item->biblionumber,
195
                itemnumber     => $item->id,
196
            }
184
        }
197
        }
185
    );
198
    );
186
199
(-)a/t/db_dependent/Koha/Biblio.t (-5 / +9 lines)
Lines 1524-1535 subtest 'article_requests() tests' => sub { Link Here
1524
1524
1525
        my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
1525
        my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
1526
1526
1527
        Koha::ArticleRequest->new(
1527
        $builder->build_object(
1528
            {
1528
            {
1529
                borrowernumber => $patron->id,
1529
                class => 'Koha::ArticleRequests',
1530
                biblionumber   => $biblio->id,
1530
                value => {
1531
                itemnumber     => $item->id,
1531
                    borrowernumber => $patron->id,
1532
                title          => $biblio->title,
1532
                    biblionumber   => $biblio->id,
1533
                    itemnumber     => $item->id,
1534
                    title          => $biblio->title,
1535
1536
                }
1533
            }
1537
            }
1534
        )->request;
1538
        )->request;
1535
    }
1539
    }
(-)a/t/db_dependent/Koha/Patron.t (-6 / +9 lines)
Lines 1353-1364 subtest 'article_requests() tests' => sub { Link Here
1353
1353
1354
        my $item = $builder->build_sample_item;
1354
        my $item = $builder->build_sample_item;
1355
1355
1356
        Koha::ArticleRequest->new(
1356
        $builder->build_object(
1357
            {
1357
            {
1358
                borrowernumber => $patron->id,
1358
                class => 'Koha::ArticleRequests',
1359
                biblionumber   => $item->biblionumber,
1359
                value => {
1360
                itemnumber     => $item->id,
1360
                    borrowernumber => $patron->id,
1361
                title          => "Title",
1361
                    biblionumber   => $item->biblionumber,
1362
                    itemnumber     => $item->id,
1363
                    title          => "Title",
1364
1365
                }
1362
            }
1366
            }
1363
        )->request;
1367
        )->request;
1364
    }
1368
    }
1365
- 

Return to bug 36081