2013-12-03 21:56:20 +01:00
|
|
|
require 'test_helper'
|
|
|
|
|
2017-05-29 22:18:04 +02:00
|
|
|
# Mostly a data holder model, to maintain coutry > region data
|
2013-12-03 21:56:20 +01:00
|
|
|
class RegionTest < ActiveSupport::TestCase
|
2019-04-27 14:44:29 +02:00
|
|
|
test 'proper timezone' do
|
|
|
|
assert regions(:region_one).tzid.present?
|
2019-12-21 21:00:16 +01:00
|
|
|
assert_equal 'Europe/Paris', regions(:region_one).tzid
|
2019-04-27 14:44:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
test 'check québec timezone is local timezone' do
|
2019-12-21 21:00:16 +01:00
|
|
|
assert_equal Time.now.zone, regions(:region_quebec).tzid
|
2019-04-27 14:44:29 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
test 'check other timezone is local timezone' do
|
2020-04-03 14:43:21 +02:00
|
|
|
assert_equal 'CEST', regions(:region_other).tzid
|
2019-04-27 14:44:29 +02:00
|
|
|
end
|
2013-12-03 21:56:20 +01:00
|
|
|
end
|