[RUN ALL RSPEC] Fix keyword deprecation in spec factories
What does this MR do?
Fix keyword deprecation in spec factories
We can see which specs are affected by removing factory_bot from the allowlist. We then see:
Failures:
1) Notes::UpdateService#execute suggestions refreshes note suggestions
Failure/Error: raise RaiseDisallowedDeprecation.new(test, current_deprecations)
DeprecationToolkitEnv::DeprecationBehaviors::SelectiveRaise::RaiseDisallowedDeprecation:
Disallowed deprecations detected while running test #<RSpec::Core::Example "refreshes note suggestions">:
DEPRECATION WARNING: /Users/tkuah/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/factory_bot-6.1.0/lib/factory_bot/decorator.rb:16: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/Users/tkuah/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/factory_bot-6.1.0/lib/factory_bot/decorator/invocation_tracker.rb:10: warning: The called method `method_missing' is defined here
(called from block (3 levels) in <main> at /Users/tkuah/code/ee-gdk/gitlab/spec/factories/diff_position.rb:27)
Related issue: #257438 (closed)
Edited by Thong Kuah