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
61871fcb
Commit
61871fcb
authored
Dec 04, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove obsolete alerts service helper
parent
1643cf25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
app/models/project.rb
app/models/project.rb
+0
-4
spec/models/project_spec.rb
spec/models/project_spec.rb
+0
-22
No files found.
app/models/project.rb
View file @
61871fcb
...
...
@@ -2430,10 +2430,6 @@ class Project < ApplicationRecord
protected_branches
.
limit
(
limit
)
end
def
alerts_service_activated?
alerts_service
&
.
active?
end
def
self_monitoring?
Gitlab
::
CurrentSettings
.
self_monitoring_project_id
==
id
end
...
...
spec/models/project_spec.rb
View file @
61871fcb
...
...
@@ -6275,28 +6275,6 @@ RSpec.describe Project, factory_default: :keep do
end
end
describe
'#alerts_service_activated?'
do
let!
(
:project
)
{
create
(
:project
)
}
subject
{
project
.
alerts_service_activated?
}
context
'when project has an activated alerts service'
do
before
do
create
(
:alerts_service
,
project:
project
)
end
it
{
is_expected
.
to
be_truthy
}
end
context
'when project has an inactive alerts service'
do
before
do
create
(
:alerts_service
,
:inactive
,
project:
project
)
end
it
{
is_expected
.
to
be_falsey
}
end
end
describe
'#prometheus_service_active?'
do
let
(
:project
)
{
create
(
:project
)
}
...
...
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