diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-24 09:08:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-24 09:08:51 +0000 |
commit | 38149afcf95e7669a7a99828c579d185b70c04dc (patch) | |
tree | 3a90504bd926407c0cc60f44e20dba08217b928b /spec/lib/gitlab/omniauth_logging | |
parent | be660fe1d28a65ad61be24c71e66ae90f6488dc4 (diff) | |
download | gitlab-ce-38149afcf95e7669a7a99828c579d185b70c04dc.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/omniauth_logging')
-rw-r--r-- | spec/lib/gitlab/omniauth_logging/json_formatter_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/lib/gitlab/omniauth_logging/json_formatter_spec.rb b/spec/lib/gitlab/omniauth_logging/json_formatter_spec.rb new file mode 100644 index 00000000000..36405daed5a --- /dev/null +++ b/spec/lib/gitlab/omniauth_logging/json_formatter_spec.rb @@ -0,0 +1,12 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe Gitlab::OmniauthLogging::JSONFormatter do + it "generates log in json format" do + Timecop.freeze(Time.utc(2019, 12, 04, 9, 10, 11, 123456)) do + expect(subject.call(:info, Time.now, 'omniauth', 'log message')) + .to eq %Q({"severity":"info","timestamp":"2019-12-04T09:10:11.123Z","pid":#{Process.pid},"progname":"omniauth","message":"log message"}\n) + end + end +end |