|
Lines 7-13
use t::lib::TestBuilder;
Link Here
|
| 7 |
|
7 |
|
| 8 |
use C4::Context; |
8 |
use C4::Context; |
| 9 |
|
9 |
|
| 10 |
use Test::More tests => 76; |
10 |
use Test::More tests => 73; |
| 11 |
use Test::Exception; |
11 |
use Test::Exception; |
| 12 |
|
12 |
|
| 13 |
use MARC::Record; |
13 |
use MARC::Record; |
|
Lines 117-129
my $hold = Koha::Holds->find( $reserve_id );
Link Here
|
| 117 |
ok( $hold, "Koha::Holds found the hold" ); |
117 |
ok( $hold, "Koha::Holds found the hold" ); |
| 118 |
my $hold_biblio = $hold->biblio(); |
118 |
my $hold_biblio = $hold->biblio(); |
| 119 |
ok( $hold_biblio, "Got biblio using biblio() method" ); |
119 |
ok( $hold_biblio, "Got biblio using biblio() method" ); |
| 120 |
ok( $hold_biblio == $hold->biblio(), "biblio method returns stashed biblio" ); |
|
|
| 121 |
my $hold_item = $hold->item(); |
120 |
my $hold_item = $hold->item(); |
| 122 |
ok( $hold_item, "Got item using item() method" ); |
121 |
ok( $hold_item, "Got item using item() method" ); |
| 123 |
ok( $hold_item == $hold->item(), "item method returns stashed item" ); |
|
|
| 124 |
my $hold_branch = $hold->branch(); |
122 |
my $hold_branch = $hold->branch(); |
| 125 |
ok( $hold_branch, "Got branch using branch() method" ); |
123 |
ok( $hold_branch, "Got branch using branch() method" ); |
| 126 |
ok( $hold_branch == $hold->branch(), "branch method returns stashed branch" ); |
|
|
| 127 |
my $hold_found = $hold->found(); |
124 |
my $hold_found = $hold->found(); |
| 128 |
$hold->set({ found => 'W'})->store(); |
125 |
$hold->set({ found => 'W'})->store(); |
| 129 |
is( Koha::Holds->waiting()->count(), 1, "Koha::Holds->waiting returns waiting holds" ); |
126 |
is( Koha::Holds->waiting()->count(), 1, "Koha::Holds->waiting returns waiting holds" ); |
| 130 |
- |
|
|