add a spec that the ghost user cannot log in

This commit is contained in:
http://jneen.net/ 2017-03-07 15:27:59 -08:00
parent 275a46c523
commit 8f057a5109

View file

@ -48,6 +48,18 @@ feature 'Login', feature: true do
end
end
describe 'with the ghost user' do
it 'disallows login' do
login_with(User.ghost)
expect(page).to have_content('Invalid Login or password.')
end
it 'does not update Devise trackable attributes' do
expect { login_with(User.ghost) }.not_to change { User.ghost.reload.sign_in_count }
end
end
describe 'with two-factor authentication' do
def enter_code(code)
fill_in 'user_otp_attempt', with: code