2020-02-08 03:08:47 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 18:09:03 +00:00
|
|
|
RSpec.describe Gitlab::LogTimestampFormatter do
|
2020-02-08 03:08:47 +00:00
|
|
|
subject { described_class.new }
|
|
|
|
|
|
|
|
let(:formatted_timestamp) { Time.now.utc.iso8601(3) }
|
|
|
|
|
|
|
|
it 'logs the timestamp in UTC and ISO8601.3 format' do
|
2020-08-31 15:10:41 +00:00
|
|
|
freeze_time do
|
2020-02-08 03:08:47 +00:00
|
|
|
expect(subject.call('', Time.now, '', '')).to include formatted_timestamp
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|