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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-07 00:09:01 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-07 00:09:01 +0300
commitca3ff7f842fb1e4bf124356a6faccd3e65b7aba3 (patch)
treebefb345c84e172b0592378ca17298f7a0c955a06 /spec/features
parent1287690a3678ad0ec21c9b2f3b21ae18257d5e22 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/profiles/password_spec.rb23
1 files changed, 19 insertions, 4 deletions
diff --git a/spec/features/profiles/password_spec.rb b/spec/features/profiles/password_spec.rb
index 1d0db488751..6c860740354 100644
--- a/spec/features/profiles/password_spec.rb
+++ b/spec/features/profiles/password_spec.rb
@@ -51,11 +51,11 @@ RSpec.describe 'Profile > Password' do
end
context 'Password authentication unavailable' do
- before do
- gitlab_sign_in(user)
- end
-
context 'Regular user' do
+ before do
+ gitlab_sign_in(user)
+ end
+
let(:user) { create(:user) }
it 'renders 404 when password authentication is disabled for the web interface and Git' do
@@ -69,7 +69,22 @@ RSpec.describe 'Profile > Password' do
end
context 'LDAP user' do
+ include LdapHelpers
+
+ let(:ldap_settings) { { enabled: true } }
let(:user) { create(:omniauth_user, provider: 'ldapmain') }
+ let(:provider) { 'ldapmain' }
+ let(:provider_label) { 'Main LDAP' }
+
+ before do
+ stub_ldap_setting(ldap_settings)
+ stub_ldap_access(user, provider, provider_label)
+ sign_in_using_ldap!(user, provider_label, provider)
+ end
+
+ after(:all) do
+ Rails.application.reload_routes!
+ end
it 'renders 404' do
visit edit_profile_password_path