Bug 30410: (follow-up) Instantiate object in unit test
This patch updates the unit test for the BackgroundJob->_derived_class() private method to instantiate a proper object to work on instead of calling the type_to_class_mapping method directly as non-object method. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
c2f2153780
commit
5a637617e4
1 changed files with 2 additions and 1 deletions
|
@ -35,7 +35,8 @@ subtest '_derived_class() tests' => sub {
|
|||
|
||||
$schema->storage->txn_begin;
|
||||
|
||||
my $mapping = Koha::BackgroundJob::type_to_class_mapping;
|
||||
my $job_object = Koha::BackgroundJob->new();
|
||||
my $mapping = $job_object->type_to_class_mapping;
|
||||
|
||||
# pick the first
|
||||
my $type = ( keys %{$mapping} )[0];
|
||||
|
|
Loading…
Reference in a new issue