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
491801ef
Commit
491801ef
authored
Mar 04, 2022
by
Katrin Leinweber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Stop using UrlHelper includes in specs
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/341401
parent
007ad73d
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
3 additions
and
22 deletions
+3
-22
.rubocop_todo/rails/include_url_helper.yml
.rubocop_todo/rails/include_url_helper.yml
+0
-10
ee/spec/helpers/ee/projects/security/configuration_helper_spec.rb
...helpers/ee/projects/security/configuration_helper_spec.rb
+0
-2
ee/spec/lib/banzai/filter/cross_project_issuable_information_filter_spec.rb
.../filter/cross_project_issuable_information_filter_spec.rb
+1
-2
spec/helpers/merge_requests_helper_spec.rb
spec/helpers/merge_requests_helper_spec.rb
+0
-1
spec/helpers/nav/top_nav_helper_spec.rb
spec/helpers/nav/top_nav_helper_spec.rb
+0
-2
spec/helpers/notify_helper_spec.rb
spec/helpers/notify_helper_spec.rb
+0
-1
spec/lib/banzai/filter/reference_redactor_filter_spec.rb
spec/lib/banzai/filter/reference_redactor_filter_spec.rb
+1
-2
spec/lib/banzai/reference_redactor_spec.rb
spec/lib/banzai/reference_redactor_spec.rb
+1
-2
No files found.
.rubocop_todo/rails/include_url_helper.yml
deleted
100644 → 0
View file @
007ad73d
---
Rails/IncludeUrlHelper
:
Exclude
:
-
ee/spec/helpers/ee/projects/security/configuration_helper_spec.rb
-
ee/spec/lib/banzai/filter/cross_project_issuable_information_filter_spec.rb
-
spec/helpers/merge_requests_helper_spec.rb
-
spec/helpers/nav/top_nav_helper_spec.rb
-
spec/helpers/notify_helper_spec.rb
-
spec/lib/banzai/filter/reference_redactor_filter_spec.rb
-
spec/lib/banzai/reference_redactor_spec.rb
ee/spec/helpers/ee/projects/security/configuration_helper_spec.rb
View file @
491801ef
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
EE
::
Projects
::
Security
::
ConfigurationHelper
do
RSpec
.
describe
EE
::
Projects
::
Security
::
ConfigurationHelper
do
include
ActionView
::
Helpers
::
UrlHelper
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:current_user
)
{
create
(
:user
)
}
let
(
:current_user
)
{
create
(
:user
)
}
...
...
ee/spec/lib/banzai/filter/cross_project_issuable_information_filter_spec.rb
View file @
491801ef
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
CrossProjectIssuableInformationFilter
do
RSpec
.
describe
Banzai
::
Filter
::
CrossProjectIssuableInformationFilter
do
include
ActionView
::
Helpers
::
UrlHelper
include
FilterSpecHelper
include
FilterSpecHelper
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
...
@@ -13,7 +12,7 @@ RSpec.describe Banzai::Filter::CrossProjectIssuableInformationFilter do
...
@@ -13,7 +12,7 @@ RSpec.describe Banzai::Filter::CrossProjectIssuableInformationFilter do
def
create_link
(
issuable
)
def
create_link
(
issuable
)
type
=
issuable
.
class
.
name
.
underscore
.
downcase
type
=
issuable
.
class
.
name
.
underscore
.
downcase
link_to
(
issuable
.
to_reference
,
''
,
ActionController
::
Base
.
helpers
.
link_to
(
issuable
.
to_reference
,
''
,
class:
'gfm has-tooltip'
,
class:
'gfm has-tooltip'
,
title:
issuable
.
title
,
title:
issuable
.
title
,
data:
{
data:
{
...
...
spec/helpers/merge_requests_helper_spec.rb
View file @
491801ef
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
MergeRequestsHelper
do
RSpec
.
describe
MergeRequestsHelper
do
include
ActionView
::
Helpers
::
UrlHelper
include
ProjectForksHelper
include
ProjectForksHelper
describe
'#state_name_with_icon'
do
describe
'#state_name_with_icon'
do
...
...
spec/helpers/nav/top_nav_helper_spec.rb
View file @
491801ef
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Nav
::
TopNavHelper
do
RSpec
.
describe
Nav
::
TopNavHelper
do
include
ActionView
::
Helpers
::
UrlHelper
let_it_be
(
:user
)
{
build_stubbed
(
:user
)
}
let_it_be
(
:user
)
{
build_stubbed
(
:user
)
}
let_it_be
(
:admin
)
{
build_stubbed
(
:user
,
:admin
)
}
let_it_be
(
:admin
)
{
build_stubbed
(
:user
,
:admin
)
}
let_it_be
(
:external_user
)
{
build_stubbed
(
:user
,
:external
,
can_create_group:
false
)
}
let_it_be
(
:external_user
)
{
build_stubbed
(
:user
,
:external
,
can_create_group:
false
)
}
...
...
spec/helpers/notify_helper_spec.rb
View file @
491801ef
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
NotifyHelper
do
RSpec
.
describe
NotifyHelper
do
include
ActionView
::
Helpers
::
UrlHelper
using
RSpec
::
Parameterized
::
TableSyntax
using
RSpec
::
Parameterized
::
TableSyntax
describe
'merge_request_reference_link'
do
describe
'merge_request_reference_link'
do
...
...
spec/lib/banzai/filter/reference_redactor_filter_spec.rb
View file @
491801ef
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
require
'spec_helper'
require
'spec_helper'
RSpec
.
describe
Banzai
::
Filter
::
ReferenceRedactorFilter
do
RSpec
.
describe
Banzai
::
Filter
::
ReferenceRedactorFilter
do
include
ActionView
::
Helpers
::
UrlHelper
include
FilterSpecHelper
include
FilterSpecHelper
it
'ignores non-GFM links'
do
it
'ignores non-GFM links'
do
...
@@ -14,7 +13,7 @@ RSpec.describe Banzai::Filter::ReferenceRedactorFilter do
...
@@ -14,7 +13,7 @@ RSpec.describe Banzai::Filter::ReferenceRedactorFilter do
end
end
def
reference_link
(
data
)
def
reference_link
(
data
)
link_to
(
'text'
,
''
,
class:
'gfm'
,
data:
data
)
ActionController
::
Base
.
helpers
.
link_to
(
'text'
,
''
,
class:
'gfm'
,
data:
data
)
end
end
it
'skips when the skip_redaction flag is set'
do
it
'skips when the skip_redaction flag is set'
do
...
...
spec/lib/banzai/reference_redactor_spec.rb
View file @
491801ef
...
@@ -106,13 +106,12 @@ RSpec.describe Banzai::ReferenceRedactor do
...
@@ -106,13 +106,12 @@ RSpec.describe Banzai::ReferenceRedactor do
end
end
context
'when the user cannot read cross project'
do
context
'when the user cannot read cross project'
do
include
ActionView
::
Helpers
::
UrlHelper
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:other_project
)
{
create
(
:project
,
:public
)
}
let
(
:other_project
)
{
create
(
:project
,
:public
)
}
def
create_link
(
issuable
)
def
create_link
(
issuable
)
type
=
issuable
.
class
.
name
.
underscore
.
downcase
type
=
issuable
.
class
.
name
.
underscore
.
downcase
link_to
(
issuable
.
to_reference
,
''
,
ActionController
::
Base
.
helpers
.
link_to
(
issuable
.
to_reference
,
''
,
class:
'gfm has-tooltip'
,
class:
'gfm has-tooltip'
,
title:
issuable
.
title
,
title:
issuable
.
title
,
data:
{
data:
{
...
...
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