Commit 29ec9856 authored by Douglas Barbosa Alexandre's avatar Douglas Barbosa Alexandre

Merge branch 'factory_bot_keyword_deprecations' into 'master'

[RUN ALL RSPEC] Fix keyword deprecation in spec factories

See merge request gitlab-org/gitlab!53429
parents 7623554a ac581bec
......@@ -62,7 +62,6 @@ module DeprecationToolkitEnv
grape-1.5.1/lib/grape/validations/validators/coerce.rb
grape_logging-1.8.3/lib/grape_logging/middleware/request_logger.rb
activesupport-6.0.3.4/lib/active_support/cache.rb
factory_bot-6.1.0/lib/factory_bot/decorator.rb
batch-loader-1.4.0/lib/batch_loader/graphql.rb
carrierwave-1.3.1/lib/carrierwave/sanitized_file.rb
activerecord-6.0.3.4/lib/active_record/relation.rb
......
......@@ -17,7 +17,7 @@ FactoryBot.define do
attrs[:design] ||= association(:design, issue: issue)
attrs[:version] ||= association(:design_version, issue: issue)
new(attrs)
new(**attrs)
end
end
end
......@@ -24,7 +24,7 @@ FactoryBot.define do
head_sha { diff_refs&.head_sha }
start_sha { diff_refs&.start_sha }
initialize_with { new(attributes) }
initialize_with { new(**attributes) }
trait :moved do
new_path { 'path/to/new.file' }
......
......@@ -121,8 +121,8 @@ FactoryBot.define do
env = create(:environment, project: projects[3])
[3, 31].each do |n|
deployment_options = { created_at: n.days.ago, project: env.project, environment: env }
create(:deployment, :failed, deployment_options)
create(:deployment, :success, deployment_options)
create(:deployment, :failed, **deployment_options)
create(:deployment, :success, **deployment_options)
create_list(:project_snippet, 2, project: projects[0], created_at: n.days.ago)
create(:personal_snippet, created_at: n.days.ago)
end
......
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