Add currency validation to account, update demo data generator (#996)

* Add currency validation to account, update demo data generator

* Fix tests
This commit is contained in:
Zach Gollwitzer
2024-07-17 14:18:12 -04:00
committed by GitHub
parent ef0f910b9b
commit b200b71284
6 changed files with 44 additions and 27 deletions

View File

@@ -84,6 +84,7 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
assert_difference [ "Account.count", "Account::Valuation.count", "Account::Entry.count" ], 1 do
post accounts_path, params: {
account: {
name: "Test",
accountable_type: "Depository",
balance: 200,
currency: "USD",
@@ -101,6 +102,7 @@ class AccountsControllerTest < ActionDispatch::IntegrationTest
assert_difference -> { Account.count } => 1, -> { Account::Valuation.count } => 2 do
post accounts_path, params: {
account: {
name: "Test",
accountable_type: "Depository",
balance: 200,
currency: "USD",