#778: update TimeLiving class
This commit is contained in:
parent
7528b05715
commit
c08d99ffbb
|
@ -12,7 +12,7 @@ module Modules
|
|||
|
||||
validate lambda {
|
||||
# 2 min <= time_living <= 12 hours
|
||||
if 120 > time_living || time_living > 43200
|
||||
if 120 > time_living.to_i || time_living.to_i > 43200
|
||||
errors.add(:time_living, I18n.t('flash.time_living.numericality_error'))
|
||||
end
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ describe Product do
|
|||
Platform.delete_all
|
||||
User.delete_all
|
||||
Product.delete_all
|
||||
FileUtils.rm_rf(APP_CONFIG['root_path'])
|
||||
init_test_root
|
||||
# Need for validate_uniqueness_of check
|
||||
FactoryGirl.create(:product)
|
||||
end
|
||||
|
@ -28,7 +28,7 @@ describe Product do
|
|||
Platform.delete_all
|
||||
User.delete_all
|
||||
Product.delete_all
|
||||
FileUtils.rm_rf(APP_CONFIG['root_path'])
|
||||
clear_test_root
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue