Skip to content

Fixes for Rails 7.1 that can be extracted into default branch

Igor Drozdov requested to merge id-rails-7.1-small-fixes into master

What

  • Fix spec/models/project_authorization_spec.rb
  • Destroy a persisted model in tests to trigger after-commit
  • Verify location for redirect url instead of body
  • Redefine not_enqueue_email matcher
  • Render pagination only if needed
  • Do not fetch from cache if user is nil
  • Use Arel::Table#name instead of Arel::Table#table_name
  • Rename db:test:load -> db:test:load_schema
  • Remove redundant ::Gitlab::Routing.url_helpers inclusion

Why

These changes fix the tests in Draft: Upgrade Rails to 7.1.1 version (!124004); however, they can be extracted to make the diff of the MR smaller.

The commits can be squashed on merge.

Edited by Igor Drozdov

Merge request reports