Skip to content

Fix user specs for Rails 7

Heinrich Lee Yu requested to merge fix-rails-7-users-spec into master

What does this MR do and why?

In Rails 7, the #size call was triggering an invalid count query because of the distinct call so we force the relation to be loaded.

This is extracted from the Rails 7 MR to make it smaller. The change also works in Rails 6 so we can merge it ahead to master.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Heinrich Lee Yu

Merge request reports

Loading