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

Check variable entity audit_events

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