Skip to content
Snippets Groups Projects
Commit f0afb806 authored by Bryce Johnson's avatar Bryce Johnson
Browse files

Add spec for testing ldap tabs.

parent 67ca15bb
No related branches found
No related tags found
1 merge request!7351WIP: Add spec for testing ldap tabs.
Pipeline #
......@@ -257,6 +257,25 @@ def stub_omniauth_config(messages)
end
end
context 'when ldap is enabled', js: true do
before do
stub_application_setting(signup_enabled: true)
# Mock enable LDAP
@ldap_servers = [{ provider_name: 'ldapmain', label: 'ldapmain' }]
allow(page).to receive(:form_based_providers).and_return([:ldapmain])
allow(page).to receive(:ldap_enabled).and_return(true)
allow(page).to receive(:ldap_servers).and_return(@ldap_servers)
allow(Gitlab.config.ldap).to receive(:enabled).and_return(true)
allow(Gitlab::LDAP::Config).to receive(:servers).and_return(@ldap_servers)
visit new_user_session_path
end
it 'correctly renders tabs and panes' do
ensure_tab_pane_correctness(false)
end
end
def ensure_tab_pane_correctness(visit_path = true)
if visit_path
visit new_user_session_path
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment