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
af069be5
Commit
af069be5
authored
Sep 29, 2021
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add group ip restriction helper spec
parent
f4991d95
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
0 deletions
+49
-0
ee/spec/helpers/admin/ip_restriction_helper_spec.rb
ee/spec/helpers/admin/ip_restriction_helper_spec.rb
+49
-0
No files found.
ee/spec/helpers/admin/ip_restriction_helper_spec.rb
0 → 100644
View file @
af069be5
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Admin
::
IpRestrictionHelper
do
let
(
:group
)
{
create
(
:group
)
}
describe
'#ip_restriction_feature_available'
do
subject
{
helper
.
ip_restriction_feature_available?
(
group
)
}
context
'when group_ip_restriction feature is available'
do
before
do
stub_licensed_features
(
group_ip_restriction:
true
)
end
it
{
is_expected
.
to
be_truthy
}
end
context
'when group_ip_restriction feature is disabled'
do
before
do
stub_licensed_features
(
group_ip_restriction:
false
)
end
it
{
is_expected
.
to
be_falsey
}
end
context
'when usage ping is enabled'
do
before
do
stub_application_setting
(
usage_ping_enabled:
true
)
end
context
'when usage_ping_features is enabled'
do
before
do
stub_application_setting
(
usage_ping_features_enabled:
true
)
end
it
{
is_expected
.
to
be_truthy
}
end
context
'when usage_ping_features is disabled'
do
before
do
stub_application_setting
(
usage_ping_features_enabled:
false
)
end
it
{
is_expected
.
to
be_falsey
}
end
end
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