Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
07717649
Commit
07717649
authored
Mar 30, 2022
by
Ash McKenzie
Committed by
Paul Gascou-Vaillancourt
Mar 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stub arkose_labs_enabled? helper
parent
09c4a2b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
ee/spec/views/devise/sessions/new.html.haml_spec.rb
ee/spec/views/devise/sessions/new.html.haml_spec.rb
+8
-4
No files found.
ee/spec/views/devise/sessions/new.html.haml_spec.rb
View file @
07717649
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment