Module: Decidim::WardenTestHelpers
- Includes:
 - Warden::Test::Helpers
 
- Defined in:
 - lib/decidim/dev/test/rspec_support/warden.rb
 
Instance Method Summary collapse
- 
  
    
      #relogin_as(user, scope: :user)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    
Utility method to login in the middle of a test as a different user from the current one.
 
Instance Method Details
#relogin_as(user, scope: :user) ⇒ Object
Utility method to login in the middle of a test as a different user from the current one.
      11 12 13 14 15 16  | 
    
      # File 'lib/decidim/dev/test/rspec_support/warden.rb', line 11 def relogin_as(user, scope: :user) logout scope sleep 0.5 login_as user, scope: end  |