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>
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({