diff options
Diffstat (limited to 'spec/requests/api/terraform/modules')
-rw-r--r-- | spec/requests/api/terraform/modules/v1/packages_spec.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/spec/requests/api/terraform/modules/v1/packages_spec.rb b/spec/requests/api/terraform/modules/v1/packages_spec.rb index 2bd7cb027aa..f479ca25f3c 100644 --- a/spec/requests/api/terraform/modules/v1/packages_spec.rb +++ b/spec/requests/api/terraform/modules/v1/packages_spec.rb @@ -415,12 +415,15 @@ RSpec.describe API::Terraform::Modules::V1::Packages, feature_category: :package with_them do let(:snowplow_gitlab_standard_context) do - { + context = { project: project, - user: user_role == :anonymous ? nil : user, namespace: project.namespace, property: 'i_package_terraform_module_user' } + + context[:user] = user if user_role != :anonymous + + context end before do |