excel_sheet_spec.rb 443 B

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