Commit 07717649 authored by Ash McKenzie's avatar Ash McKenzie Committed by Paul Gascou-Vaillancourt

Stub arkose_labs_enabled? helper

parent 09c4a2b9
......@@ -16,9 +16,9 @@ RSpec.describe 'devise/sessions/new' do
allow(Gitlab).to receive(:com?).and_return(true)
end
context 'when the :arkose_labs_login_challenge feature flag is enabled' do
context 'when arkose_labs_enabled? is enabled' do
before do
stub_feature_flags(arkose_labs_login_challenge: true)
stub_arkose_labs(enabled: true)
subject
end
......@@ -32,9 +32,9 @@ RSpec.describe 'devise/sessions/new' do
end
end
context 'when the :arkose_labs_login_challenge feature flag is disabled' do
context 'when arkose_labs_enabled? is disabled' do
before do
stub_feature_flags(arkose_labs_login_challenge: false)
stub_arkose_labs(enabled: false)
subject
end
......@@ -55,4 +55,8 @@ RSpec.describe 'devise/sessions/new' do
allow(view).to receive(:captcha_enabled?).and_return(false)
allow(view).to receive(:captcha_on_login_required?).and_return(false)
end
def stub_arkose_labs(enabled:)
allow(view).to receive(:arkose_labs_enabled?).and_return(enabled)
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment