Module: Decidim::WardenTestHelpers

Includes:
Warden::Test::Helpers
Defined in:
decidim-dev/lib/decidim/dev/test/rspec_support/warden.rb

Instance Method Summary collapse

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
# File 'decidim-dev/lib/decidim/dev/test/rspec_support/warden.rb', line 11

def relogin_as(user, scope: :user)
  logout scope

   user, scope:
end