debian-mirror-gitlab/spec/lib/gitlab/log_timestamp_formatter_spec.rb
2020-03-13 15:44:24 +05:30

15 lines
375 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::LogTimestampFormatter do
subject { described_class.new }
let(:formatted_timestamp) { Time.now.utc.iso8601(3) }
it 'logs the timestamp in UTC and ISO8601.3 format' do
Timecop.freeze(Time.now) do
expect(subject.call('', Time.now, '', '')).to include formatted_timestamp
end
end
end