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
7f143f73
Commit
7f143f73
authored
Aug 10, 2020
by
Dallas Reedy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify instance_review_permitted? spec
parent
a4eec913
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
ee/spec/models/application_setting_spec.rb
ee/spec/models/application_setting_spec.rb
+6
-17
No files found.
ee/spec/models/application_setting_spec.rb
View file @
7f143f73
...
...
@@ -545,26 +545,15 @@ RSpec.describe ApplicationSetting do
context
'for instances without a valid license'
do
before
do
allow
(
License
).
to
receive
(
:current
).
and_return
(
nil
)
expect
(
Rails
.
cache
).
to
receive
(
:fetch
).
and_return
(
::
ApplicationSetting
::
INSTANCE_REVIEW_MIN_USERS
+
users_over_minimum
)
end
context
'when there are more users than minimum count'
do
before
do
expect
(
Rails
.
cache
).
to
receive
(
:fetch
).
and_return
(
101
)
end
it
'is permitted'
do
expect
(
subject
).
to
be_truthy
end
end
context
'when there are less users than minimum count'
do
before
do
create
(
:user
)
end
where
(
users_over_minimum:
[
-
1
,
0
,
1
])
it
'is not permitted'
do
expect
(
subject
).
to
be_falsey
end
with_them
do
it
{
is_expected
.
to
be
(
users_over_minimum
>=
0
)
}
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