Merge branch 'patch-1' of https://github.com/mr-c/arvados into mr-c-patch-1
[arvados.git] / services / api / test / unit / time_zone_test.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 require 'test_helper'
6
7 class TimeZoneTest < ActiveSupport::TestCase
8   test "Database connection time zone" do
9     # This is pointless if the testing host is already using the UTC
10     # time zone.  But if not, the test confirms that
11     # config/initializers/time_zone.rb has successfully changed the
12     # database connection time zone to UTC.
13     assert_equal('UTC', ActiveRecord::Base.connection.select_value("show timezone"))
14   end
15 end