mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
tweaked readme
changed mixed validation spec to datetime value out of Time range
This commit is contained in:
@@ -336,8 +336,9 @@ describe ValidatesTimeliness::Validations do
|
||||
@person.errors.on(:birth_date_and_time).should match(/must be after/)
|
||||
end
|
||||
|
||||
it "should correctly validate date attribute with Time restriction" do
|
||||
@person.birth_date = "2008-01-03"
|
||||
it "should correctly validate date attribute with DateTime restriction" do
|
||||
@person.birth_date = "2008-01-03"
|
||||
@person.birth_date_and_time = "1890-01-01 00:00:00"
|
||||
@person.should_not be_valid
|
||||
@person.errors.on(:birth_date).should match(/must be on or before/)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user