Lines 19-25
Link Here
|
19 |
|
19 |
|
20 |
use Modern::Perl; |
20 |
use Modern::Perl; |
21 |
|
21 |
|
22 |
use Test::More tests => 3; |
22 |
use Test::More tests => 4; |
23 |
use t::lib::TestBuilder; |
23 |
use t::lib::TestBuilder; |
24 |
|
24 |
|
25 |
use Koha::Database; |
25 |
use Koha::Database; |
Lines 73-78
subtest 'user() tests' => sub {
Link Here
|
73 |
$schema->storage->txn_rollback; |
73 |
$schema->storage->txn_rollback; |
74 |
}; |
74 |
}; |
75 |
|
75 |
|
|
|
76 |
subtest 'assignee() tests' => sub { |
77 |
|
78 |
plan tests => 2; |
79 |
|
80 |
$schema->storage->txn_begin; |
81 |
|
82 |
my $assignee = $builder->build_object( { class => 'Koha::Patrons' } ); |
83 |
my $update = $builder->build_object( |
84 |
{ |
85 |
class => 'Koha::Ticket::Updates', |
86 |
value => { assignee_id => $assignee->id } |
87 |
} |
88 |
); |
89 |
|
90 |
my $linked_assignee = $update->assignee; |
91 |
is( ref($linked_assignee), 'Koha::Patron', 'Koha::Ticket::Update->assignee returns a Koha::Patron object' ); |
92 |
is( $linked_assignee->id, $assignee->id, 'Koha::Ticket::Update->assignee returns the right Koha::Patron' ); |
93 |
|
94 |
$schema->storage->txn_rollback; |
95 |
}; |
96 |
|
76 |
subtest 'strings_map() tests' => sub { |
97 |
subtest 'strings_map() tests' => sub { |
77 |
plan tests => 16; |
98 |
plan tests => 16; |
78 |
|
99 |
|
79 |
- |
|
|