Bugzilla – Attachment 139766 Details for
Bug 30359
GetBudgetHierarchy is slow on order receive page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30359: Unit tests
Bug-30359-Unit-tests.patch (text/plain), 2.50 KB, created by
Nick Clemens
on 2022-08-25 11:20:17 UTC
(
hide
)
Description:
Bug 30359: Unit tests
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2022-08-25 11:20:17 UTC
Size:
2.50 KB
patch
obsolete
>From 2c2220f7ca8958c5c2ba649b597073cff837fdf3 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 25 Aug 2022 11:18:18 +0000 >Subject: [PATCH] Bug 30359: Unit tests > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > t/db_dependent/Budgets.t | 14 ++++++++++++-- > 1 file changed, 12 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t >index 2b7716cb80..094583f3f0 100755 >--- a/t/db_dependent/Budgets.t >+++ b/t/db_dependent/Budgets.t >@@ -1,6 +1,6 @@ > #!/usr/bin/perl > use Modern::Perl; >-use Test::More tests => 147; >+use Test::More tests => 154; > use JSON; > > BEGIN { >@@ -589,9 +589,19 @@ is($budget_hierarchy->[0]->{budget_level},'0','budget_level of budget (budget_1) > is($budget_hierarchy->[0]->{children}->[0]->{budget_level},'1','budget_level of first fund(budget_11) should be 1'); > is($budget_hierarchy->[0]->{children}->[1]->{budget_level},'1','budget_level of second fund(budget_12) should be 1'); > is($budget_hierarchy->[0]->{children}->[0]->{children}->[0]->{budget_level},'2','budget_level of child fund budget_11 should be 2'); >+ >+#Test skiptotals >+$budget_hierarchy = GetBudgetHierarchy($budget_period_id, undef, undef, 1); >+is( $budget_hierarchy->[0]->{children}->[0]->{budget_name}, 'budget_11', 'GetBudgetHierarchy skiptotals should return budgets ordered by name, first child is budget_11' ); >+is( $budget_hierarchy->[0]->{children}->[1]->{budget_name}, 'budget_12', 'GetBudgetHierarchy skiptotals should return budgets ordered by name, second child is budget_12' ); >+is($budget_hierarchy->[0]->{budget_name},'budget_1','GetBudgetHierarchy skiptotals should return budgets ordered by name, first budget is budget_1'); >+is($budget_hierarchy->[0]->{budget_level},'0','skiptotals: budget_level of budget (budget_1) should be 0'); >+is($budget_hierarchy->[0]->{children}->[0]->{budget_level},'1','skiptotals: budget_level of first fund(budget_11) should be 1'); >+is($budget_hierarchy->[0]->{children}->[1]->{budget_level},'1','skiptotals: budget_level of second fund(budget_12) should be 1'); >+is($budget_hierarchy->[0]->{children}->[0]->{children}->[0]->{budget_level},'2','skiptotals: budget_level of child fund budget_11 should be 2'); >+ > $budget_hierarchy = GetBudgetHierarchy($budget_period_id); > $budget_hierarchy_cloned = GetBudgetHierarchy($budget_period_id_cloned); >- > is( scalar(@$budget_hierarchy_cloned), scalar(@$budget_hierarchy), > 'CloneBudgetPeriod (with inactive param) clones the same number of budgets (funds)' > ); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30359
:
132283
|
139765
|
139766
|
140017
|
140018