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
c1cc3f96
Commit
c1cc3f96
authored
Jun 15, 2021
by
Furkan Ayhan
Committed by
Abdul Wadood
Jun 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 2 suggestion(s) to 1 file(s)
parent
cc6fd37d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
ee/spec/controllers/subscriptions_controller_spec.rb
ee/spec/controllers/subscriptions_controller_spec.rb
+2
-2
No files found.
ee/spec/controllers/subscriptions_controller_spec.rb
View file @
c1cc3f96
...
...
@@ -237,7 +237,7 @@ RSpec.describe SubscriptionsController do
let
(
:group
)
{
Group
.
new
(
path:
'foo'
)
}
it
'returns the errors in json format'
do
group
.
save
# rubocop:disable Rails/SaveBang
group
.
valid?
subject
expect
(
response
.
body
).
to
include
({
name:
[
"can't be blank"
]
}.
to_json
)
...
...
@@ -247,7 +247,7 @@ RSpec.describe SubscriptionsController do
let
(
:group
)
{
Group
.
new
(
path:
'foo'
,
name:
'<script>alert("attack")</script>'
)
}
it
'returns the errors in json format'
do
group
.
save
# rubocop:disable Rails/SaveBang
group
.
valid?
subject
expect
(
Gitlab
::
Json
.
parse
(
response
.
body
)[
'name'
]).
to
match_array
([
Gitlab
::
Regex
.
group_name_regex_message
,
HtmlSafetyValidator
.
error_message
])
...
...
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