Sha256: c8878b6c0921192fc97db76bdda8af6c9e8397530e7d3e9daf8bb3e3b8a668c3
Contents?: true
Size: 645 Bytes
Versions: 2
Compression:
Stored size: 645 Bytes
Contents
# frozen_string_literal: true require 'rails_helper' RSpec.describe ModelDate, 'filters:date' do specify do expected = Time.new(1984, 10, 23, 0, 0, 0, 0) expect(described_class.create(date: '1984-10-23').date).to eq expected end specify do expected = Time.new(1984, 10, 23, 0, 0, 0, 0) expect(described_class.create(date_format: '84/10/23').date_format).to eq expected end specify do hours = offset_in_hours('America/Sao_Paulo') expected = Time.new(1984, 10, 23, 0, 0, 0, 0) + (hours.hours * -1) expect(described_class.create(date_time_zone: '1984-10-23').date_time_zone).to eq expected end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
normalizy-1.0.1 | spec/normalizy/extensions/filters/date_spec.rb |
normalizy-1.0.0 | spec/normalizy/extensions/filters/date_spec.rb |