Commit 39d711a8 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch '329752-use-push-method-on-auditable' into 'master'

Use push method on Auditable module

See merge request gitlab-org/gitlab!60982
parents 10897d0c 28520f96
...@@ -4,6 +4,6 @@ module Auditable ...@@ -4,6 +4,6 @@ module Auditable
def push_audit_event(event) def push_audit_event(event)
return unless ::Gitlab::Audit::EventQueue.active? return unless ::Gitlab::Audit::EventQueue.active?
::Gitlab::Audit::EventQueue.current << event ::Gitlab::Audit::EventQueue.push(event)
end end
end end
...@@ -13,8 +13,8 @@ RSpec.describe Gitlab::Audit::Auditor do ...@@ -13,8 +13,8 @@ RSpec.describe Gitlab::Audit::Auditor do
let(:remove_message) { 'Removed an interesting field from project Gotham' } let(:remove_message) { 'Removed an interesting field from project Gotham' }
let(:operation) do let(:operation) do
proc do proc do
::Gitlab::Audit::EventQueue.current << add_message ::Gitlab::Audit::EventQueue.push(add_message)
::Gitlab::Audit::EventQueue.current << remove_message ::Gitlab::Audit::EventQueue.push(remove_message)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment