Skip to content

Commit

Permalink
test(feature): expect statements to have unresolved unadjusted values
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed May 19, 2024
1 parent c08f84a commit e11ca1e
Showing 1 changed file with 68 additions and 12 deletions.
80 changes: 68 additions & 12 deletions t/Feature/Resource/FrozenPeriodTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,8 @@ public function testDefaultCheck()
$first_equity_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "2500",
"closed_debit_amount" => "0",
Expand All @@ -742,6 +744,8 @@ public function testDefaultCheck()
$first_asset_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $asset_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "2500",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "2000",
Expand All @@ -750,6 +754,8 @@ public function testDefaultCheck()
$first_expense_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "0",
Expand Down Expand Up @@ -797,20 +803,26 @@ public function testDefaultCheck()
"summary_calculations" => [
[
"account_id" => $asset_account->id,
"unadjusted_debit_amount" => "2750",
"unadjusted_credit_amount" => "0",
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "250",
"closed_debit_amount" => "2750",
"closed_credit_amount" => "0"
],
[
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "2000",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "3000",
"closed_debit_amount" => "0",
"closed_credit_amount" => "2750"
],
[
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "250",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "0",
Expand Down Expand Up @@ -994,6 +1006,8 @@ public function testValidChainCreate()
$first_equity_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "2500",
"closed_debit_amount" => "0",
Expand All @@ -1002,6 +1016,8 @@ public function testValidChainCreate()
$first_asset_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $asset_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "2500",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "2000",
Expand All @@ -1010,6 +1026,8 @@ public function testValidChainCreate()
$first_expense_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "0",
Expand All @@ -1036,13 +1054,17 @@ public function testValidChainCreate()
$this->seeNumRecords(6, "summary_calculations", []);
$this->seeInDatabase("summary_calculations", [
"account_id" => $asset_account->id,
"unadjusted_debit_amount" => "2750",
"unadjusted_credit_amount" => "0",
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "250",
"closed_debit_amount" => "2750",
"closed_credit_amount" => "0"
]);
$this->seeInDatabase("summary_calculations", [
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "2000",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "3000",
"closed_debit_amount" => "0",
Expand Down Expand Up @@ -1128,6 +1150,8 @@ public function testValidIncompleteChainCreate()
$first_asset_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $asset_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "2500",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "2000",
Expand All @@ -1136,6 +1160,8 @@ public function testValidIncompleteChainCreate()
$first_asset_b_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $asset_b_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "2000",
Expand All @@ -1144,6 +1170,8 @@ public function testValidIncompleteChainCreate()
$first_expense_summary_calculation = $summary_calculation_fabricator->setOverrides([
"frozen_period_id" => $first_frozen_period->id,
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "0",
Expand All @@ -1170,20 +1198,26 @@ public function testValidIncompleteChainCreate()
$this->seeNumRecords(8, "summary_calculations", []);
$this->seeInDatabase("summary_calculations", [
"account_id" => $asset_account->id,
"unadjusted_debit_amount" => "2750",
"unadjusted_credit_amount" => "0",
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "250",
"closed_debit_amount" => "2750",
"closed_credit_amount" => "0"
]);
$this->seeInDatabase("summary_calculations", [
"account_id" => $asset_b_account->id,
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "2000",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "2000",
"closed_credit_amount" => "0"
]);
$this->seeInDatabase("summary_calculations", [
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "4000",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "5000",
"closed_debit_amount" => "0",
Expand Down Expand Up @@ -1457,20 +1491,26 @@ public function testValidOpenCheck()
"summary_calculations" => [
[
"account_id" => $asset_account->id,
"unadjusted_debit_amount" => "2750",
"unadjusted_credit_amount" => "0",
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "250",
"closed_debit_amount" => "2750",
"closed_credit_amount" => "0"
],
[
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "2000",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "3000",
"closed_debit_amount" => "0",
"closed_credit_amount" => "3000"
],
[
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "250",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "250",
Expand Down Expand Up @@ -1620,27 +1660,35 @@ public function testValidIncompleteChainOpenCheck()
"summary_calculations" => [
[
"account_id" => $asset_account->id,
"unadjusted_debit_amount" => "2750",
"unadjusted_credit_amount" => "0",
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "250",
"closed_debit_amount" => "2750",
"closed_credit_amount" => "0"
],
[
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "4000",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "5000",
"closed_debit_amount" => "0",
"closed_credit_amount" => "5000"
],
[
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "250",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "250",
"closed_credit_amount" => "0"
],
[
"account_id" => $asset_b_account->id,
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "2000",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "2000",
Expand Down Expand Up @@ -1834,27 +1882,35 @@ public function testValidIncompleteExchangeChainOpenCheck()
"summary_calculations" => [
[
"account_id" => $asset_account->id,
"unadjusted_debit_amount" => "2500",
"unadjusted_credit_amount" => "0",
"opened_debit_amount" => "2000",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3000",
"unadjusted_credit_amount" => "500",
"closed_debit_amount" => "2500",
"closed_credit_amount" => "0"
],
[
"account_id" => $equity_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "2000",
"unadjusted_debit_amount" => "0",
"unadjusted_credit_amount" => "3000",
"closed_debit_amount" => "0",
"closed_credit_amount" => "3000"
],
[
"account_id" => $foreign_asset_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "3",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "3",
"closed_credit_amount" => "0"
],
[
"account_id" => $expense_account->id,
"opened_debit_amount" => "0",
"opened_credit_amount" => "0",
"unadjusted_debit_amount" => "250",
"unadjusted_credit_amount" => "0",
"closed_debit_amount" => "250",
Expand Down

0 comments on commit e11ca1e

Please sign in to comment.