diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-08 06:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-08 06:08:47 +0300 |
commit | 91ed938e3d17d385a08459915972d7e3f6b8468e (patch) | |
tree | 194203988e612d82afbcc20f9aaf06ab6a451b39 /spec/lib | |
parent | bef1bd93d113723a156f5943e743193afad1ef71 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/log_timestamp_formatter_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/lib/gitlab/log_timestamp_formatter_spec.rb b/spec/lib/gitlab/log_timestamp_formatter_spec.rb new file mode 100644 index 00000000000..1a76d02889b --- /dev/null +++ b/spec/lib/gitlab/log_timestamp_formatter_spec.rb @@ -0,0 +1,15 @@ +# 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 |