Skip to content

Fix specs ordering related to omniauth stub

The following discussion from !8483 (merged) should be addressed:

  • @ayufan started a discussion:

    1) Groups::OmniauthCallbacksController when request hasn't been validated by omniauth middleware prevents authentication
         Failure/Error:
           expect do
             post provider, group_id: group
           end.to raise_error(AbstractController::ActionNotFound)
    
           expected AbstractController::ActionNotFound but nothing was raised
         # ./ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb:25:in `block (3 levels) in <top (required)>'
    
    Finished in 18 minutes 55 seconds (files took 15.92 seconds to load)
    2403 examples, 1 failure, 168 pending
    
    Failed examples:
    
    rspec ./ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb:22 # Groups::OmniauthCallbacksController when request hasn't been validated by omniauth middleware prevents authentication

    The failure is related to ordering of specs:

    ee/spec/features/users/login_spec.rb
    ee/spec/controllers/groups/omniauth_callbacks_controller_spec.rb