mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-24 23:59:40 +02:00
Set minimum supported date for account entries (#1023)
* Set minimum supported date for account entries * Fix validation proc * Fix date input in system tests
This commit is contained in:
parent
701e17829d
commit
76dd5e57fb
6 changed files with 16 additions and 4 deletions
|
@ -7,6 +7,12 @@ class Account::EntryTest < ActiveSupport::TestCase
|
|||
@entry = account_entries :transaction
|
||||
end
|
||||
|
||||
test "entry cannot be older than 10 years ago" do
|
||||
assert_raises ActiveRecord::RecordInvalid do
|
||||
@entry.update! date: 50.years.ago.to_date
|
||||
end
|
||||
end
|
||||
|
||||
test "valuations cannot have more than one entry per day" do
|
||||
existing_valuation = account_entries :valuation
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue