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
09dd8676
Commit
09dd8676
authored
May 27, 2021
by
Luke Duncalfe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `non_existing_record_id` for group API tests
Fixes
https://gitlab.com/gitlab-org/gitlab/-/issues/331981
parent
bfd6a20c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
spec/requests/api/groups_spec.rb
spec/requests/api/groups_spec.rb
+7
-7
No files found.
spec/requests/api/groups_spec.rb
View file @
09dd8676
...
...
@@ -506,7 +506,7 @@ RSpec.describe API::Groups do
end
it
"does not return a non existing group"
do
get
api
(
"/groups/
1328
"
,
user1
)
get
api
(
"/groups/
#{
non_existing_record_id
}
"
,
user1
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
...
...
@@ -586,7 +586,7 @@ RSpec.describe API::Groups do
end
it
"does not return a non existing group"
do
get
api
(
"/groups/
1328
"
,
admin
)
get
api
(
"/groups/
#{
non_existing_record_id
}
"
,
admin
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
...
...
@@ -729,7 +729,7 @@ RSpec.describe API::Groups do
end
it
'returns 404 for a non existing group'
do
put
api
(
'/groups/1328'
,
user1
),
params:
{
name:
new_group_name
}
put
api
(
"/groups/
#{
non_existing_record_id
}
"
,
user1
),
params:
{
name:
new_group_name
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
...
...
@@ -954,7 +954,7 @@ RSpec.describe API::Groups do
end
it
"does not return a non existing group"
do
get
api
(
"/groups/
1328
/projects"
,
user1
)
get
api
(
"/groups/
#{
non_existing_record_id
}
/projects"
,
user1
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
...
...
@@ -1008,7 +1008,7 @@ RSpec.describe API::Groups do
end
it
"does not return a non existing group"
do
get
api
(
"/groups/
1328
/projects"
,
admin
)
get
api
(
"/groups/
#{
non_existing_record_id
}
/projects"
,
admin
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
...
...
@@ -1667,7 +1667,7 @@ RSpec.describe API::Groups do
end
it
"does not remove a non existing group"
do
delete
api
(
"/groups/
1328
"
,
user1
)
delete
api
(
"/groups/
#{
non_existing_record_id
}
"
,
user1
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
...
...
@@ -1687,7 +1687,7 @@ RSpec.describe API::Groups do
end
it
"does not remove a non existing group"
do
delete
api
(
"/groups/
1328
"
,
admin
)
delete
api
(
"/groups/
#{
non_existing_record_id
}
"
,
admin
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
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