summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-03-07 15:27:59 -0800
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 11:49:53 -0800
commit8f057a5109687016fe72c6512fa0d4ea2354731f (patch)
tree30558bfb072a2ef7d69264a4e3d20bdb7a45a3d0
parent275a46c52338ab3bfb4da73431465d742060e3ea (diff)
downloadgitlab-ce-8f057a5109687016fe72c6512fa0d4ea2354731f.tar.gz
add a spec that the ghost user cannot log in
-rw-r--r--spec/features/login_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/features/login_spec.rb b/spec/features/login_spec.rb
index ae609160e18..f32d1f78b40 100644
--- a/spec/features/login_spec.rb
+++ b/spec/features/login_spec.rb
@@ -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