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
ccb17f83
Commit
ccb17f83
authored
Mar 26, 2021
by
Jason Goodman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply 2 suggestion(s) to 1 file(s)
parent
548b6184
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
10 deletions
+6
-10
ee/spec/requests/groups_controller_spec.rb
ee/spec/requests/groups_controller_spec.rb
+6
-10
No files found.
ee/spec/requests/groups_controller_spec.rb
View file @
ccb17f83
...
...
@@ -31,11 +31,9 @@ RSpec.describe GroupsController, type: :request do
context
'valid param'
do
shared_examples
'creates ip restrictions'
do
it
'creates ip restrictions'
do
expect
(
group
.
ip_restrictions
).
to
be_empty
subject
expect
(
group
.
reload
.
ip_restrictions
.
map
(
&
:range
)).
to
contain_exactly
(
*
range
.
split
(
','
))
expect
{
subject
}
.
to
change
{
group
.
reload
.
ip_restrictions
.
map
(
&
:range
)
}
.
from
([]).
to
(
contain_exactly
(
*
range
.
split
(
','
)))
expect
(
response
).
to
have_gitlab_http_status
(
:found
)
end
end
...
...
@@ -73,11 +71,9 @@ RSpec.describe GroupsController, type: :request do
context
'valid param'
do
shared_examples
'updates ip restrictions'
do
it
'updates ip restrictions'
do
expect
(
group
.
ip_restrictions
.
map
(
&
:range
)).
to
eq
([
'10.0.0.0/8'
])
subject
expect
(
group
.
reload
.
ip_restrictions
.
map
(
&
:range
)).
to
contain_exactly
(
*
range
.
split
(
','
))
expect
{
subject
}
.
to
change
{
group
.
reload
.
ip_restrictions
.
map
(
&
:range
)
}
.
from
([
'10.0.0.0/8'
]).
to
(
contain_exactly
(
*
range
.
split
(
','
)))
expect
(
response
).
to
have_gitlab_http_status
(
:found
)
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