Bug 17431: Create the object we need instead of assuming something exists
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
f9e9f52018
commit
620a8fb823
1 changed files with 2 additions and 2 deletions
|
@ -41,8 +41,8 @@ $ENV{REMOTE_ADDR} = '127.0.0.1';
|
|||
my $t = Test::Mojo->new('Koha::REST::V1');
|
||||
my $tx;
|
||||
|
||||
my $categorycode = Koha::Database->new()->schema()->resultset('Category')->first()->categorycode();
|
||||
my $branchcode = Koha::Database->new()->schema()->resultset('Branch')->first()->branchcode();
|
||||
my $categorycode = $builder->build({ source => 'Category' })->{categorycode};
|
||||
my $branchcode = $builder->build({ source => 'Branch' })->{branchcode};
|
||||
|
||||
# User without any permissions
|
||||
my $nopermission = $builder->build({
|
||||
|
|
Loading…
Reference in a new issue