test(arap): the role inventory gains bad_debts (P4b S7)
B-41 gives the write-off its own expense role (6990 Bad Debt Expense, 8.3.4), so the pinned inventory of control roles has thirteen keys, not twelve; the new role's key, default code and type are checked with the rest. No other role changes.
This commit is contained in:
1 parent
22cdfcf34b
commit
176baa5250
1 file changed
+8
-4
@@ -48,8 +48,9 @@ fn line(desc: &str, amount: &str) -> DocumentLine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The twelve role keys, as the spec lists them (B-23 and `UnknownRole`).
|
/// The thirteen role keys, as the spec lists them (B-23, B-41's
|
||||||
const KEYS: [&str; 12] = [
|
/// bad_debts, and `UnknownRole`).
|
||||||
|
const KEYS: [&str; 13] = [
|
||||||
"receivables",
|
"receivables",
|
||||||
"revenue",
|
"revenue",
|
||||||
"payables",
|
"payables",
|
||||||
@@ -62,6 +63,7 @@ const KEYS: [&str; 12] = [
|
|||||||
"social_security_payable",
|
"social_security_payable",
|
||||||
"medicare_payable",
|
"medicare_payable",
|
||||||
"other_deductions_payable",
|
"other_deductions_payable",
|
||||||
|
"bad_debts",
|
||||||
];
|
];
|
||||||
|
|
||||||
fn role(key: &str) -> &'static ControlAccount {
|
fn role(key: &str) -> &'static ControlAccount {
|
||||||
@@ -248,8 +250,9 @@ fn alice() -> PayrollLine {
|
|||||||
|
|
||||||
// ------------------------------------------------------------ the roles
|
// ------------------------------------------------------------ the roles
|
||||||
|
|
||||||
/// Oracle: B-23 names the roles and their default codes; `control_account`
|
/// Oracle: B-23 (and B-41 for bad_debts) names the roles and their default
|
||||||
/// finds a role by its `key`; `UnknownRole` lists the twelve keys.
|
/// codes; `control_account` finds a role by its `key`; `UnknownRole` lists
|
||||||
|
/// the thirteen keys.
|
||||||
#[test]
|
#[test]
|
||||||
fn every_role_has_its_key_default_code_and_type() {
|
fn every_role_has_its_key_default_code_and_type() {
|
||||||
use AccountType::*;
|
use AccountType::*;
|
||||||
@@ -258,6 +261,7 @@ fn every_role_has_its_key_default_code_and_type() {
|
|||||||
("revenue", "4000", Revenue),
|
("revenue", "4000", Revenue),
|
||||||
("payables", "2000", Liability),
|
("payables", "2000", Liability),
|
||||||
("general_expense", "6999", Expense),
|
("general_expense", "6999", Expense),
|
||||||
|
("bad_debts", "6990", Expense),
|
||||||
("retained_earnings", "3999", Equity),
|
("retained_earnings", "3999", Equity),
|
||||||
("salary_expense", "6100", Expense),
|
("salary_expense", "6100", Expense),
|
||||||
("payroll_tax_expense", "6110", Expense),
|
("payroll_tax_expense", "6110", Expense),
|
||||||
|
|||||||
Reference in new issue
Block a user