Sha256: e3e203ec51426471363ee8283f99d27f4692e43dc64ff9ac6ff1bde26e742491
Contents?: true
Size: 532 Bytes
Versions: 5
Compression:
Stored size: 532 Bytes
Contents
require 'rails_helper' require 'active_support/time' module BerkeleyLibrary module Logging describe SafeSerializer do describe :serialize do it 'handles ActiveSupport::TimeWithZone' do Time.zone = 'America/Los_Angeles' t = Time.current expect(t).to be_a(ActiveSupport::TimeWithZone) # just to be sure expect(SafeSerializer.serialize(t)).to be(t) h = { time: t } expect(SafeSerializer.serialize(h)).to eq(h) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems