Rails5: fix can't quote ActiveSupport::HashWithIndifferentAccess
What does this MR do?
Rails5 fix for spec/lib/gitlab/import/merge_request_creator_spec.rb
. See https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/92247852.
This error was caused by trying to call connection.quote
on an empty HashWithIndifferentAccess
(merge_params). Since merge_params
is a serialised attribute and bulk_insert
only works with raw attributes, this attribute should not be in the test at all.
Rails 4 also serialises these merge_params
to "'--- !ruby/hash:ActiveSupport::HashWithIndifferentAccess {}\n'"
.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated -
Tests added for this feature/bug -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides