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
7904e7ec
Commit
7904e7ec
authored
Sep 29, 2021
by
Rajendra Kadam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add repo size limit helper spec
parent
af069be5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
ee/spec/helpers/admin/ip_restriction_helper_spec.rb
ee/spec/helpers/admin/ip_restriction_helper_spec.rb
+8
-0
ee/spec/helpers/admin/repo_size_limit_helper_spec.rb
ee/spec/helpers/admin/repo_size_limit_helper_spec.rb
+57
-0
No files found.
ee/spec/helpers/admin/ip_restriction_helper_spec.rb
View file @
7904e7ec
...
@@ -45,5 +45,13 @@ RSpec.describe Admin::IpRestrictionHelper do
...
@@ -45,5 +45,13 @@ RSpec.describe Admin::IpRestrictionHelper do
it
{
is_expected
.
to
be_falsey
}
it
{
is_expected
.
to
be_falsey
}
end
end
end
end
context
'when usage ping is disabled'
do
before
do
stub_application_setting
(
usage_ping_enabled:
false
)
end
it
{
is_expected
.
to
be_falsey
}
end
end
end
end
end
ee/spec/helpers/admin/repo_size_limit_helper_spec.rb
0 → 100644
View file @
7904e7ec
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
Admin
::
RepoSizeLimitHelper
do
describe
'#repo_size_limit_feature_available?'
do
subject
{
helper
.
repo_size_limit_feature_available?
}
context
'when repository_size_limit feature is available'
do
before
do
stub_licensed_features
(
repository_size_limit:
true
)
end
it
{
is_expected
.
to
be_truthy
}
end
context
'when repo_size_limit_feature_available is not available'
do
before
do
stub_licensed_features
(
repository_size_limit:
false
)
end
it
{
is_expected
.
to
be_falsey
}
end
context
'when usage ping is enabled'
do
before
do
stub_licensed_features
(
repository_size_limit:
false
)
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
context
'when usage ping is disabled'
do
before
do
stub_application_setting
(
usage_ping_enabled:
false
)
stub_licensed_features
(
repository_size_limit:
false
)
end
it
{
is_expected
.
to
be_falsey
}
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