Link Here
|
32 |
|
32 |
|
33 |
my $schema = Koha::Database->new->schema; |
33 |
my $schema = Koha::Database->new->schema; |
34 |
my $builder = t::lib::TestBuilder->new; |
34 |
my $builder = t::lib::TestBuilder->new; |
35 |
use_ok('Koha::Illcomment'); |
35 |
use_ok('Koha::ILL::Comment'); |
36 |
use_ok('Koha::Illcomments'); |
36 |
use_ok('Koha::ILL::Comments'); |
37 |
|
37 |
|
38 |
$schema->storage->txn_begin; |
38 |
$schema->storage->txn_begin; |
39 |
|
39 |
|
Link Here
|
66 |
|
66 |
|
67 |
# Get all the comments |
67 |
# Get all the comments |
68 |
my $comments = $illrq_obj->illcomments; |
68 |
my $comments = $illrq_obj->illcomments; |
69 |
isa_ok( $comments, 'Koha::Illcomments', "Illcomments" ); |
69 |
isa_ok( $comments, 'Koha::ILL::Comments', "Illcomments" ); |
70 |
my @comments_list = $comments->as_list(); |
70 |
my @comments_list = $comments->as_list(); |
71 |
is( scalar @comments_list, 1, "We have 1 comment" ); |
71 |
is( scalar @comments_list, 1, "We have 1 comment" ); |
72 |
|
72 |
|
73 |
# Get the first (and only) comment |
73 |
# Get the first (and only) comment |
74 |
my $comment = $comments->next(); |
74 |
my $comment = $comments->next(); |
75 |
isa_ok( $comment, 'Koha::Illcomment', "Illcomment" ); |
75 |
isa_ok( $comment, 'Koha::ILL::Comment', "Illcomment" ); |
76 |
|
76 |
|
77 |
# Check the different data in the comment |
77 |
# Check the different data in the comment |
78 |
is( $comment->illrequest_id, $illrq_obj->illrequest_id, 'illrequest_id getter works' ); |
78 |
is( $comment->illrequest_id, $illrq_obj->illrequest_id, 'illrequest_id getter works' ); |