Bugzilla – Attachment 119542 Details for
Bug 23195
Shipping costs are inconsistent in where displayed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23195: Unit tests
Bug-23195-Unit-tests.patch (text/plain), 3.12 KB, created by
Séverine Queune
on 2021-04-13 16:20:25 UTC
(
hide
)
Description:
Bug 23195: Unit tests
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2021-04-13 16:20:25 UTC
Size:
3.12 KB
patch
obsolete
>From df9426cc9e9ec7968de7ab077870a1770ee72898 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 12 Apr 2021 18:13:21 +0000 >Subject: [PATCH] Bug 23195: Unit tests >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> >--- > t/db_dependent/Budgets.t | 35 +++++++++++++++++++++++++++++++++-- > 1 file changed, 33 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Budgets.t b/t/db_dependent/Budgets.t >index 59a7431a53..0e8fc0b168 100755 >--- a/t/db_dependent/Budgets.t >+++ b/t/db_dependent/Budgets.t >@@ -816,8 +816,8 @@ is( scalar @{$authCat}, 0, "GetBudgetAuthCats returns only non-empty sorting cat > > # /Test GetBudgetAuthCats > >-subtest 'GetBudgetSpent and GetBudgetOrdered' => sub { >- plan tests => 20; >+subtest 'GetBudgetSpent and GetBudgetOrdered and GetBudgetHierarchy shipping and adjustments' => sub { >+ plan tests => 26; > > my $budget_period = $builder->build({ > source => 'Aqbudgetperiod', >@@ -957,6 +957,37 @@ subtest 'GetBudgetSpent and GetBudgetOrdered' => sub { > is( $ordered, 3, "After adding invoice adjustment on a child budget, should still be 3 ordered/budget unaffected"); > is( @$hierarchy[0]->{total_spent},9,"After adding invoice adjustment on child budget, budget hierarchy shows 9 spent"); > is( @$hierarchy[0]->{total_ordered},6,"After adding invoice adjustment on child budget, budget hierarchy shows 6 ordered"); >+ >+ my $invoice_3 = $builder->build({ >+ source => 'Aqinvoice', >+ value => { >+ closedate => '2017-07-01', >+ shipmentcost_budgetid => $budget0->{budget_id}, >+ shipmentcost => 1.25 >+ } >+ }); >+ my $invoice_4 = $builder->build({ >+ source => 'Aqinvoice', >+ value => { >+ closedate => '2017-07-01', >+ shipmentcost_budgetid => $budget0->{budget_id}, >+ shipmentcost => 1.75 >+ } >+ }); >+ >+ $spent = GetBudgetSpent( $budget->{budget_id} ); >+ $ordered = GetBudgetOrdered( $budget->{budget_id} ); >+ is( $spent, 6, "After adding invoice shipment cost on open and closed invoice on child, neither are counted as spent from parent"); >+ is( $ordered, 3, "After adding invoice shipment cost on open and closed invoice, neither are counted as ordered from parent"); >+ $spent = GetBudgetSpent( $budget0->{budget_id} ); >+ $ordered = GetBudgetOrdered( $budget0->{budget_id} ); >+ is( $spent, 6, "After adding invoice shipment cost on open and closed invoice on child, both are counted as spent from child"); >+ is( $ordered, 3, "After adding invoice shipment cost on open and closed invoice, neither are counted as ordered from child"); >+ $hierarchy = GetBudgetHierarchy($budget_period->{budget_period_id} ); >+ is( @$hierarchy[0]->{total_spent},12,"After adding shipmentcost on child, budget hierarchy shows 12 spent total"); >+ is( @$hierarchy[0]->{total_ordered},6,"After adding shipmentcost on child, budget hierarchy still shows 6 ordered total"); >+ >+ > }; > > subtest 'GetBudgetSpent GetBudgetOrdered GetBudgetsPlanCell tests' => sub { >-- >2.11.0
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 23195
:
119466
|
119467
|
119542
|
119543
|
119797
|
119798
|
119941