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
94695f86
Commit
94695f86
authored
Jun 22, 2017
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify spec, so it works with prepended EE::FormHelper
parent
9116a150
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/features/issues/form_ee_spec.rb
spec/features/issues/form_ee_spec.rb
+3
-3
No files found.
spec/features/issues/form_ee_spec.rb
View file @
94695f86
...
...
@@ -24,15 +24,15 @@ describe 'New/edit issue (EE)', :feature, :js do
visit
new_project_issue_path
(
project
)
end
describe
'shorten users API pagination limit
(CE)
'
do
describe
'shorten users API pagination limit'
do
before
do
# Using `allow_any_instance_of`/`and_wrap_original`, `original` would
# somehow refer to the very block we defined to _wrap_ that method, instead of
# the original method, resulting in infinite recurison when called.
# This is likely a bug with helper modules included into dynamically generated view classes.
# To work around this, we have to hold on to and call to the original implementation manually.
original_issue_dropdown_options
=
FormHelper
.
instance_method
(
:issue
_dropdown_options
)
allow_any_instance_of
(
FormHelper
).
to
receive
(
:issue
_dropdown_options
).
and_wrap_original
do
|
original
,
*
args
|
original_issue_dropdown_options
=
EE
::
FormHelper
.
instance_method
(
:issue_assignees
_dropdown_options
)
allow_any_instance_of
(
EE
::
FormHelper
).
to
receive
(
:issue_assignees
_dropdown_options
).
and_wrap_original
do
|
original
,
*
args
|
options
=
original_issue_dropdown_options
.
bind
(
original
.
receiver
).
call
(
*
args
)
options
[
:data
][
:per_page
]
=
2
...
...
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