excel_sheet_spec.rb 520 B

12345678910111213141516
  1. # Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
  2. require 'rails_helper'
  3. RSpec.describe ExcelSheet do
  4. describe '.timestamp_in_localtime' do
  5. let(:document) { described_class.new(title: 'some title', header: [], records: [], timezone: 'Europe/Berlin', locale: 'de-de') }
  6. it 'does convert UTC timestamp to local system based timestamp' do
  7. expect(document.timestamp_in_localtime(Time.parse('2019-08-08T01:00:05Z').in_time_zone)).to eq('2019-08-08 03:00:05')
  8. end
  9. end
  10. end