Skip to content
Snippets Groups Projects
Commit 3c0a5f97 authored by Matthias Käppler's avatar Matthias Käppler 2️⃣
Browse files

Merge branch '372413-fix-namespace_throttle_service_spec-ruby3' into 'master'

Add curly brackets to fix the matcher in ruby 3

See merge request !96859
parents 63a3ff10 786322af
No related branches found
No related tags found
2 merge requests!97251Synchronize ruby3 branch manually due to conflicts,!96859Add curly brackets to fix the matcher in ruby 3
Pipeline #631365223 passed
...@@ -76,13 +76,13 @@ ...@@ -76,13 +76,13 @@
end end
it 'logs the event', :aggregate_failures do it 'logs the event', :aggregate_failures do
expect(Gitlab::AppLogger).to receive(:info).with( expect(Gitlab::AppLogger).to receive(:info).with({
message: "User exceeded max projects download within set time period for namespace", message: "User exceeded max projects download within set time period for namespace",
username: user.username, username: user.username,
max_project_downloads: limit, max_project_downloads: limit,
time_period_s: time_period_in_seconds, time_period_s: time_period_in_seconds,
namespace_id: namespace.id namespace_id: namespace.id
) })
expect(Gitlab::AppLogger).to receive(:info).with({ expect(Gitlab::AppLogger).to receive(:info).with({
message: "Namespace-level user ban", message: "Namespace-level user ban",
...@@ -129,13 +129,13 @@ ...@@ -129,13 +129,13 @@
end end
it 'logs the notification event but not the ban event', :aggregate_failures do it 'logs the notification event but not the ban event', :aggregate_failures do
expect(Gitlab::AppLogger).to receive(:info).with( expect(Gitlab::AppLogger).to receive(:info).with({
message: "User exceeded max projects download within set time period for namespace", message: "User exceeded max projects download within set time period for namespace",
username: owner.username, username: owner.username,
max_project_downloads: limit, max_project_downloads: limit,
time_period_s: time_period_in_seconds, time_period_s: time_period_in_seconds,
namespace_id: namespace.id namespace_id: namespace.id
) })
expect(Gitlab::AppLogger).not_to receive(:info).with({ expect(Gitlab::AppLogger).not_to receive(:info).with({
message: "Namespace-level user ban", message: "Namespace-level user ban",
...@@ -169,20 +169,20 @@ ...@@ -169,20 +169,20 @@
end end
it 'logs the notification event but not the ban event' do it 'logs the notification event but not the ban event' do
expect(Gitlab::AppLogger).to receive(:info).with( expect(Gitlab::AppLogger).to receive(:info).with({
message: "User exceeded max projects download within set time period for namespace", message: "User exceeded max projects download within set time period for namespace",
username: user.username, username: user.username,
max_project_downloads: limit, max_project_downloads: limit,
time_period_s: time_period_in_seconds, time_period_s: time_period_in_seconds,
namespace_id: namespace.id namespace_id: namespace.id
) })
expect(Gitlab::AppLogger).not_to receive(:info).with( expect(Gitlab::AppLogger).not_to receive(:info).with({
message: "Namespace-level user ban", message: "Namespace-level user ban",
username: user.username, username: user.username,
namespace_id: namespace.id, namespace_id: namespace.id,
ban_by: described_class.name ban_by: described_class.name
) })
execute execute
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment