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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
b8607576
Commit
b8607576
authored
Nov 18, 2016
by
Z.J. van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Projects have chat services
parent
0d04724f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
app/models/project.rb
app/models/project.rb
+1
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-0
No files found.
app/models/project.rb
View file @
b8607576
...
@@ -77,6 +77,7 @@ class Project < ActiveRecord::Base
...
@@ -77,6 +77,7 @@ class Project < ActiveRecord::Base
has_one
:last_event
,
->
{
order
'events.created_at DESC'
},
class_name:
'Event'
has_one
:last_event
,
->
{
order
'events.created_at DESC'
},
class_name:
'Event'
has_many
:boards
,
before_add: :validate_board_limit
,
dependent: :destroy
has_many
:boards
,
before_add: :validate_board_limit
,
dependent: :destroy
has_many
:chat_services
,
dependent: :destroy
# Project services
# Project services
has_one
:campfire_service
,
dependent: :destroy
has_one
:campfire_service
,
dependent: :destroy
...
...
spec/models/project_spec.rb
View file @
b8607576
...
@@ -20,6 +20,7 @@ describe Project, models: true do
...
@@ -20,6 +20,7 @@ describe Project, models: true do
it
{
is_expected
.
to
have_many
(
:deploy_keys
)
}
it
{
is_expected
.
to
have_many
(
:deploy_keys
)
}
it
{
is_expected
.
to
have_many
(
:hooks
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_many
(
:hooks
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_many
(
:protected_branches
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_many
(
:protected_branches
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_many
(
:chat_services
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:forked_project_link
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:forked_project_link
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:slack_service
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:slack_service
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:pushover_service
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:pushover_service
).
dependent
(
:destroy
)
}
...
...
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