mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
added spec for values before epoch
This commit is contained in:
parent
fd8b8bad2e
commit
8e4c4098b7
@ -37,7 +37,13 @@ describe ValidatesTimeliness::Validations do
|
|||||||
@person.should be_valid
|
@person.should be_valid
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should be valid with valid values" do
|
it "should be valid with values before epoch" do
|
||||||
|
@person.birth_date_and_time = "1960-01-31 12:12:12"
|
||||||
|
@person.birth_date = "1960-01-31"
|
||||||
|
@person.should be_valid
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should be valid with nil values when allow_blank si true" do
|
||||||
@person.birth_date_and_time = nil
|
@person.birth_date_and_time = nil
|
||||||
@person.birth_date = nil
|
@person.birth_date = nil
|
||||||
@person.should be_valid
|
@person.should be_valid
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user