diff options
author | Filipa Lacerda <filipa@gitlab.com> | 2018-03-07 21:42:57 +0300 |
---|---|---|
committer | Filipa Lacerda <filipa@gitlab.com> | 2018-03-07 21:42:57 +0300 |
commit | 318aeffcd735486ff3bbb99325825788918373c7 (patch) | |
tree | 27a916e9bfa9a7f31ead5f5c53c6a366ea8730f9 /spec/features | |
parent | b9f9e6fa4e7a54d6caee81799ed88ee40dfb645b (diff) | |
parent | 67185097734bb88979df020123cf7327bc5d32c5 (diff) |
[ci skip] Merge branch 'master' into 43770-change-clear-runners-cache-ujs-action-to-an-axios-request
* master: (68 commits)
Upgrade Workhorse to 4.0.0
naming things
Update GitLab Pages to v0.7.0
Minor fixes in API doc
Use Project#full_name instead of name_with_namespace
Fix tests not completely disabling Gitaly
Move OperationService#UserRemoveBranch
Move OperationService#UserCreateBranch
Move CommitService#Languages to OPT_OUT
Move RefService#CreateBranch to OPT_OUT
Move RefService#DeleteBranch to OPT_OUT
Move OperationService#UserRevert to OPT_OUT
Move OperationService#UserAddTag to OPT_OUT
Move CommitService::CommitPatch to OPT_OUT
Change to Pacific Time Zone
Merge branch 'pages-6-1-gitlab-10-5' into 'security-10-5'
Merge branch 'sh-fix-otp-backup-invalidation-10-5' into 'security-10-5'
Remove wrong assumption about Runners cache GC
Add CommonMark markdown engine
add nginx_status monitoring details
...
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_hooks_spec.rb | 10 | ||||
-rw-r--r-- | spec/features/users/login_spec.rb | 12 |
2 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb index f266f2ecc54..25ed3bdc88e 100644 --- a/spec/features/admin/admin_hooks_spec.rb +++ b/spec/features/admin/admin_hooks_spec.rb @@ -24,6 +24,16 @@ describe 'Admin::Hooks' do visit admin_hooks_path expect(page).to have_content(system_hook.url) end + + it 'renders plugins list as well' do + allow(Gitlab::Plugin).to receive(:files).and_return(['foo.rb', 'bar.clj']) + + visit admin_hooks_path + + expect(page).to have_content('Plugins') + expect(page).to have_content('foo.rb') + expect(page).to have_content('bar.clj') + end end describe 'New Hook' do diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 6ef235cf870..bc75dc5d19b 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -145,6 +145,18 @@ feature 'Login' do expect { enter_code(codes.sample) } .to change { user.reload.otp_backup_codes.size }.by(-1) end + + it 'invalidates backup codes twice in a row' do + random_code = codes.delete(codes.sample) + expect { enter_code(random_code) } + .to change { user.reload.otp_backup_codes.size }.by(-1) + + gitlab_sign_out + gitlab_sign_in(user) + + expect { enter_code(codes.sample) } + .to change { user.reload.otp_backup_codes.size }.by(-1) + end end context 'with invalid code' do |