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