summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb b/spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb
index 7677e5d8cb2..f18869fb380 100644
--- a/spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb
+++ b/spec/support/shared_examples/services/container_registry_auth_service_shared_examples.rb
@@ -142,9 +142,9 @@ RSpec.shared_examples 'logs an auth warning' do |requested_actions|
requested_project_path: project.full_path,
requested_actions: requested_actions,
authorized_actions: [],
- user_id: current_user.id,
- username: current_user.username
- }
+ user_id: current_user&.id,
+ username: current_user&.username
+ }.compact
end
it do