mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-24 14:56:43 +00:00
standardising test values
This commit is contained in:
parent
698ea29ff7
commit
5567f920f7
@ -16,9 +16,9 @@ module Spec
|
|||||||
def matches?(record)
|
def matches?(record)
|
||||||
@record = record
|
@record = record
|
||||||
|
|
||||||
valid = error_matching('2000-01-32', /#{options[:invalid_date_message]}/) &&
|
valid = error_matching('2000-01-32 00:00:00', /#{options[:invalid_datetime_message]}/) &&
|
||||||
error_matching('2000-01-01 25:00:00', /#{options[:invalid_date_message]}/) &&
|
error_matching('2000-01-01 25:00:00', /#{options[:invalid_datetime_message]}/) &&
|
||||||
no_error_matching('2000-01-01 12:12:12', /#{options[:invalid_date_message]}/)
|
no_error_matching('2000-01-01 00:00:00', /#{options[:invalid_datetime_message]}/)
|
||||||
|
|
||||||
if valid && after = options[:after]
|
if valid && after = options[:after]
|
||||||
valid = error_matching(after, /#{options[:after_message]}/) &&
|
valid = error_matching(after, /#{options[:after_message]}/) &&
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user