Lines 25-32
use t::lib::TestBuilder;
Link Here
|
25 |
use Test::More tests => 3; |
25 |
use Test::More tests => 3; |
26 |
|
26 |
|
27 |
my $schema = Koha::Database->new->schema; |
27 |
my $schema = Koha::Database->new->schema; |
28 |
use_ok('Koha::Illrequestattribute'); |
28 |
use_ok('Koha::ILL::Request::Attribute'); |
29 |
use_ok('Koha::Illrequestattributes'); |
29 |
use_ok('Koha::ILL::Request::Attributes'); |
30 |
|
30 |
|
31 |
subtest 'Basic object tests' => sub { |
31 |
subtest 'Basic object tests' => sub { |
32 |
|
32 |
|
Lines 34-52
subtest 'Basic object tests' => sub {
Link Here
|
34 |
|
34 |
|
35 |
$schema->storage->txn_begin; |
35 |
$schema->storage->txn_begin; |
36 |
|
36 |
|
37 |
Koha::Illrequestattributes->search->delete; |
37 |
Koha::ILL::Request::Attributes->search->delete; |
38 |
|
38 |
|
39 |
my $builder = t::lib::TestBuilder->new; |
39 |
my $builder = t::lib::TestBuilder->new; |
40 |
|
40 |
|
41 |
my $illrqattr = $builder->build( { source => 'Illrequestattribute' } ); |
41 |
my $illrqattr = $builder->build( { source => 'Illrequestattribute' } ); |
42 |
|
42 |
|
43 |
my $illrqattr_obj = Koha::Illrequestattributes->find( |
43 |
my $illrqattr_obj = Koha::ILL::Request::Attributes->find( |
44 |
$illrqattr->{illrequest_id}, |
44 |
$illrqattr->{illrequest_id}, |
45 |
$illrqattr->{backend}, |
45 |
$illrqattr->{backend}, |
46 |
$illrqattr->{type} |
46 |
$illrqattr->{type} |
47 |
); |
47 |
); |
48 |
isa_ok( |
48 |
isa_ok( |
49 |
$illrqattr_obj, 'Koha::Illrequestattribute', |
49 |
$illrqattr_obj, 'Koha::ILL::Request::Attribute', |
50 |
"Correctly create and load an illrequestattribute object." |
50 |
"Correctly create and load an illrequestattribute object." |
51 |
); |
51 |
); |
52 |
is( |
52 |
is( |
Lines 69-75
subtest 'Basic object tests' => sub {
Link Here
|
69 |
$illrqattr_obj->delete; |
69 |
$illrqattr_obj->delete; |
70 |
|
70 |
|
71 |
is( |
71 |
is( |
72 |
Koha::Illrequestattributes->search->count, 0, |
72 |
Koha::ILL::Request::Attributes->search->count, 0, |
73 |
"No attributes found after delete." |
73 |
"No attributes found after delete." |
74 |
); |
74 |
); |
75 |
|
75 |
|
76 |
- |
|
|