Bug 18999: (QA followup) Minor fixes for tests
authorAlex Buckley <alexbuckley@catalyst.net.nz>
Sat, 16 Sep 2017 07:52:25 +0000 (07:52 +0000)
committerKatrin Fischer <katrin.fischer.83@web.de>
Sun, 29 Oct 2017 18:16:50 +0000 (19:16 +0100)
Removed unneccessary declaration of $budget and changed
Koha::Acquisition::Order->new->insert into
Koha::Acquisition::Order->new->store as requested in tester feedback

Test plan:
1. Go into your koha-shell

2. set the PERL5LIB variable

3. Run t/db_dependent/Budgets.t

All tests should pass

Sponsored-by: Catalyst IT

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 90c5391b349a339b3f1fea1ebfeb044cfa76c8a6)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 8250e0f69a069ae2a43f52135e0a6d4daf259dfc)
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

t/db_dependent/Budgets.t

index ec4ee4c..6c0560a 100755 (executable)
@@ -397,7 +397,7 @@ is( GetBudgetHierarchySpent( $budget_id111 ), 20, "total spent for budget111 is
 my $budget_period_amount = 100;
 my $budget_amount = 50;
 
-my $budget = AddBudgetPeriod(
+$budget = AddBudgetPeriod(
     {
         budget_period_startdate   => '2017-08-22',
         budget_period_enddate     => '2018-08-22',
@@ -459,7 +459,7 @@ my $order = Koha::Acquisition::Order->new(
       discount           => 0,
       uncertainprice     => 0,
    }
-)->insert;
+)->store;
 
 ModReceiveOrder({
    bibionumber       => $biblio,