mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
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:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user