Stub Current.organization and not Gitlab::Current::Organization
What does this MR do and why?
This MR will change the implementation of stub_current_organization. Originally, Current.organization was only available in requests contexts (for example, Rails controllers) and we wanted to be sure that Current.organization was set using Gitlab::Current::Organization. However, we now also support Current.organization in Sidekiq workers. And Graphql specs will also not go through the entire Rails requests logic.
So it is now better to simply stub Current.organization
Additionally, the additional stubbing of Gitlab::Current::Organization in ActiveCable connection specs is also removed in this MR. The implementation needed to be changed as well.
References
Related to #550677
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.