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
aa03c1ac
Commit
aa03c1ac
authored
Nov 12, 2020
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move prometheus service policy tests to service_policy_spec
parent
2de1a4ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
spec/policies/service_policy_spec.rb
spec/policies/service_policy_spec.rb
+26
-0
No files found.
spec/policies/
prometheus_
service_policy_spec.rb
→
spec/policies/service_policy_spec.rb
View file @
aa03c1ac
...
...
@@ -2,13 +2,15 @@
require
'spec_helper'
RSpec
.
describe
PrometheusService
,
:models
do
let
(
:integration
)
{
create
(
:prometheus_service
)
}
RSpec
.
describe
ServicePolicy
,
:models
do
let
_it_be
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
integration
.
project
}
let
(
:user
)
{
create
(
:user
)
}
subject
(
:policy
)
{
Ability
.
policy_for
(
user
,
integration
)
}
context
'when the integration is a prometheus_service'
do
let
(
:integration
)
{
create
(
:prometheus_service
)
}
describe
'rules'
do
it
{
is_expected
.
to
be_disallowed
:admin_project
}
...
...
@@ -20,4 +22,5 @@ RSpec.describe PrometheusService, :models do
it
{
is_expected
.
to
be_allowed
:admin_project
}
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