Sha256: ae02bcdf66ab7b43b4f9ede70462187c89f6348f61bb5828bf6e641302ebeb5f
Contents?: true
Size: 730 Bytes
Versions: 16
Compression:
Stored size: 730 Bytes
Contents
# frozen_string_literal: true require 'devise' RSpec.configure do |config| config.include Warden::Test::Helpers config.after(:each) do Warden.test_reset! end end FactoryBot.define do factory :user, class: ::EacUsersSupport::User do email 'admin@example.com' password 'mysecret' end end RSpec.shared_context 'when user is admin', shared_context: :metadata do let(:user) { ::FactoryBot.create(:user) } before do visit '/users/sign_in' fill_in 'E-mail', with: user.email fill_in 'Password', with: user.password click_on 'Log in' end it 'user should be logged' do expect(page).to have_content user.email expect(::EacUsersSupport::User.current_user).not_to be_nil end end
Version data entries
16 entries across 16 versions & 1 rubygems