mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 07:16:41 +00:00
fixed bug with attribute cache not clearing on write for date and time columns
This commit is contained in:
@@ -108,5 +108,15 @@ describe ValidatesTimeliness::AttributeMethods do
|
||||
time = @person.birth_date_and_time
|
||||
@person.birth_date_and_time.should == time
|
||||
end
|
||||
|
||||
it "should return correct value after new value assigned" do
|
||||
today = Date.today
|
||||
tomorrow = Date.today + 1.day
|
||||
@person = Person.new
|
||||
@person.birth_date = today
|
||||
@person.birth_date.should == today
|
||||
@person.birth_date = tomorrow
|
||||
@person.birth_date.should == tomorrow
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user