Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2017-03-08 02:27:59 +0300
committerhttp://jneen.net/ <jneen@jneen.net>2017-03-09 22:49:53 +0300
commit8f057a5109687016fe72c6512fa0d4ea2354731f (patch)
tree30558bfb072a2ef7d69264a4e3d20bdb7a45a3d0 /spec/features/login_spec.rb
parent275a46c52338ab3bfb4da73431465d742060e3ea (diff)
add a spec that the ghost user cannot log in
Diffstat (limited to 'spec/features/login_spec.rb')
-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