BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
67974f1d
Commit
67974f1d
authored
Apr 25, 2017
by
Tiago Botelho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove invalid services
parent
3ff8d802
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
service.rb
app/models/service.rb
+1
-0
service_spec.rb
spec/models/service_spec.rb
+4
-0
No files found.
app/models/service.rb
View file @
67974f1d
...
...
@@ -26,6 +26,7 @@ class Service < ActiveRecord::Base
has_one
:service_hook
validates
:project_id
,
presence:
true
,
unless:
proc
{
|
service
|
service
.
template?
}
validates
:type
,
presence:
true
scope
:visible
,
->
{
where
.
not
(
type:
'GitlabIssueTrackerService'
)
}
scope
:issue_trackers
,
->
{
where
(
category:
'issue_tracker'
)
}
...
...
spec/models/service_spec.rb
View file @
67974f1d
...
...
@@ -6,6 +6,10 @@ describe Service, models: true do
it
{
is_expected
.
to
have_one
:service_hook
}
end
describe
'Validations'
do
it
{
is_expected
.
to
validate_presence_of
(
:type
).
on
(
:create
)
}
end
describe
"Test Button"
do
before
do
@service
=
Service
.
new
...
...
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