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>2023-02-16 21:09:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-16 21:09:00 +0300
commit5c4df0629a70c28eb479b513a3e6860e7a35d1c9 (patch)
treef9a661c7358b4265b2a479d62365154139f951e4 /spec/controllers
parentc1f98d9590def61ad2fca09cc06a7a9d52cdebc5 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects_controller_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb
index c0c5dcfe21d..cf87b2c4437 100644
--- a/spec/controllers/projects_controller_spec.rb
+++ b/spec/controllers/projects_controller_spec.rb
@@ -664,6 +664,20 @@ RSpec.describe ProjectsController do
expect(response).to have_gitlab_http_status(:found)
end
+ it 'logs an audit event' do
+ expect(housekeeping).to receive(:execute).once.and_yield
+
+ expect(::Gitlab::Audit::Auditor).to receive(:audit).with(a_hash_including(
+ name: 'manually_trigger_housekeeping',
+ author: user,
+ scope: project,
+ target: project,
+ message: "Housekeeping task: eager"
+ ))
+
+ subject
+ end
+
context 'and requesting prune' do
let(:prune) { true }