Commit 8f057a51 authored by http://jneen.net/'s avatar http://jneen.net/

add a spec that the ghost user cannot log in

parent 275a46c5
...@@ -48,6 +48,18 @@ feature 'Login', feature: true do ...@@ -48,6 +48,18 @@ feature 'Login', feature: true do
end end
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 describe 'with two-factor authentication' do
def enter_code(code) def enter_code(code)
fill_in 'user_otp_attempt', with: code fill_in 'user_otp_attempt', with: code
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment