mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
remove spec for evaludate_option_value zone change on model method
This commit is contained in:
parent
0df3886804
commit
1289988bed
@ -168,19 +168,12 @@ describe ValidatesTimeliness::Conversion do
|
||||
evaluate_option_value(lambda { value }, person).should == Time.utc(2010,1,1,12,0,0)
|
||||
end
|
||||
|
||||
it 'should return Time value in default zone for attribute method symbol which returns string time value' do
|
||||
it 'should return Time value for attribute method symbol which returns string time value' do
|
||||
value = '2010-01-01 12:00:00'
|
||||
person.birth_time = value
|
||||
evaluate_option_value(:birth_time, person).should == Time.utc(2010,1,1,12,0,0)
|
||||
end
|
||||
|
||||
it 'should return Time value in current zone attribute method symbol which returns string time value if timezone aware' do
|
||||
@timezone_aware = true
|
||||
value = '2010-01-01 12:00:00'
|
||||
person.birth_time = value
|
||||
evaluate_option_value(:birth_time, person).should == Time.zone.local(2010,1,1,12,0,0)
|
||||
end
|
||||
|
||||
context "restriction shorthand" do
|
||||
before do
|
||||
Timecop.freeze(Time.mktime(2010, 1, 1, 0, 0, 0))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user