Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 12:08:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-24 12:08:51 +0300
commit38149afcf95e7669a7a99828c579d185b70c04dc (patch)
tree3a90504bd926407c0cc60f44e20dba08217b928b /spec/lib/gitlab/omniauth_logging
parentbe660fe1d28a65ad61be24c71e66ae90f6488dc4 (diff)
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.rb12
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