debian-mirror-gitlab/spec/lib/gitlab/log_timestamp_formatter_spec.rb

16 lines
368 B
Ruby
Raw Normal View History

2020-03-13 15:44:24 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::LogTimestampFormatter do
2020-03-13 15:44:24 +05:30
subject { described_class.new }
let(:formatted_timestamp) { Time.now.utc.iso8601(3) }
it 'logs the timestamp in UTC and ISO8601.3 format' do
2020-11-24 15:15:51 +05:30
freeze_time do
2020-03-13 15:44:24 +05:30
expect(subject.call('', Time.now, '', '')).to include formatted_timestamp
end
end
end