Commit 6e71401d authored by Matija Čupić's avatar Matija Čupić

Check variable entity audit_events

parent f2ce671b
...@@ -5,7 +5,7 @@ module Ci ...@@ -5,7 +5,7 @@ module Ci
include ::Audit::Changes include ::Audit::Changes
def execute def execute
return unless License.feature_available?(:extended_audit_events) return unless container.feature_available?(:audit_events)
case params[:action] case params[:action]
when :create, :destroy when :create, :destroy
......
...@@ -23,7 +23,7 @@ RSpec.describe Projects::VariablesController do ...@@ -23,7 +23,7 @@ RSpec.describe Projects::VariablesController do
end end
before do before do
stub_licensed_features(extended_audit_events: true) stub_licensed_features(audit_events: true)
end end
context 'when creating variable' do context 'when creating variable' do
......
...@@ -9,7 +9,7 @@ RSpec.describe API::Variables do ...@@ -9,7 +9,7 @@ RSpec.describe API::Variables do
before do before do
project.add_maintainer(user) project.add_maintainer(user)
stub_licensed_features(extended_audit_events: true) stub_licensed_features(audit_events: true)
end end
describe 'POST /projects/:id/variables' do describe 'POST /projects/:id/variables' do
......
...@@ -20,9 +20,9 @@ RSpec.describe Ci::AuditVariableChangeService do ...@@ -20,9 +20,9 @@ RSpec.describe Ci::AuditVariableChangeService do
group.variables << variable group.variables << variable
end end
context 'when extended audits are available' do context 'when audits are available' do
before do before do
stub_licensed_features(extended_audit_events: true) stub_licensed_features(audit_events: true)
end end
context 'when creating variable' do context 'when creating variable' do
...@@ -81,9 +81,9 @@ RSpec.describe Ci::AuditVariableChangeService do ...@@ -81,9 +81,9 @@ RSpec.describe Ci::AuditVariableChangeService do
end end
end end
context 'when extended audits are not available' do context 'when audits are not available' do
before do before do
stub_licensed_features(extended_audit_events: false) stub_licensed_features(audit_events: false)
end end
context 'when creating variable' do context 'when creating variable' do
......
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