Sha256: 4a3f82a47cbfaa9714126a96ab560eda9e1259be0e8064e996b26fd98c6387c5
Contents?: true
Size: 562 Bytes
Versions: 30
Compression:
Stored size: 562 Bytes
Contents
# frozen_string_literal: true module Decidim module WardenTestHelpers include Warden::Test::Helpers # # Utility method to login in the middle of a test as a different user from # the current one. # def relogin_as(user, scope: :user) logout scope login_as user, scope: scope end end end RSpec.configure do |config| config.include Decidim::WardenTestHelpers, type: :system config.include Devise::Test::ControllerHelpers, type: :controller config.after :each, type: :system do Warden.test_reset! end end
Version data entries
30 entries across 30 versions & 1 rubygems