Sha256: c10a351ef30ebf086f9a164066d98c8be2b14f691b70785d354361ed2044de9a
Contents?: true
Size: 778 Bytes
Versions: 21
Compression:
Stored size: 778 Bytes
Contents
# Copyright 2020 Google LLC # # Use of this source code is governed by an MIT-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/MIT. # frozen_string_literal: true require "test_helper" module ActiveRecord module Type class DateTest < SpannerAdapter::TestCase include SpannerAdapter::Types::TestHelper def test_convert_to_sql_type assert_equal "DATE", connection.type_to_sql(:date) end def test_set_date expected_date = ::Date.new 2020, 1, 31 record = TestTypeModel.new start_date: expected_date assert_equal expected_date, record.start_date record.save! record.reload assert_equal expected_date, record.start_date end end end end
Version data entries
21 entries across 21 versions & 1 rubygems