mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
changed 2008 to 2000 in effort to standard test date values
This commit is contained in:
parent
5885290304
commit
2be6c639d6
@ -16,9 +16,9 @@ module Spec
|
||||
def matches?(record)
|
||||
@record = record
|
||||
|
||||
valid = error_matching('2008-02-30', /#{options[:invalid_date_message]}/) &&
|
||||
error_matching('2008-01-01 25:00:00', /#{options[:invalid_date_message]}/) &&
|
||||
no_error_matching('2008-01-01 12:12:12', /#{options[:invalid_date_message]}/)
|
||||
valid = error_matching('2000-01-32', /#{options[:invalid_date_message]}/) &&
|
||||
error_matching('2000-01-01 25:00:00', /#{options[:invalid_date_message]}/) &&
|
||||
no_error_matching('2000-01-01 12:12:12', /#{options[:invalid_date_message]}/)
|
||||
|
||||
if valid && after = options[:after]
|
||||
valid = error_matching(after, /#{options[:after_message]}/) &&
|
||||
|
||||
Loading…
Reference in New Issue
Block a user