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
8882da71
Commit
8882da71
authored
Nov 16, 2017
by
Francisco Javier López
Committed by
Sean McGivern
Nov 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed dependent constraint!
parent
a0775070
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
app/models/group.rb
app/models/group.rb
+1
-1
spec/ee/spec/models/ee/project_spec.rb
spec/ee/spec/models/ee/project_spec.rb
+1
-1
spec/models/group_spec.rb
spec/models/group_spec.rb
+1
-0
No files found.
app/models/group.rb
View file @
8882da71
...
@@ -37,7 +37,7 @@ class Group < Namespace
...
@@ -37,7 +37,7 @@ class Group < Namespace
# We cannot simply set `has_many :audit_events, as: :entity, dependent: :destroy`
# We cannot simply set `has_many :audit_events, as: :entity, dependent: :destroy`
# here since Group inherits from Namespace, the entity_type would be set to `Namespace`.
# here since Group inherits from Namespace, the entity_type would be set to `Namespace`.
has_many
:audit_events
,
->
{
where
(
entity_type:
Group
)
},
dependent: :delete_all
,
foreign_key:
'entity_id'
# rubocop:disable Cop/ActiveRecordDependent
has_many
:audit_events
,
->
{
where
(
entity_type:
Group
)
},
foreign_key:
'entity_id'
validate
:avatar_type
,
if:
->
(
user
)
{
user
.
avatar
.
present?
&&
user
.
avatar_changed?
}
validate
:avatar_type
,
if:
->
(
user
)
{
user
.
avatar
.
present?
&&
user
.
avatar_changed?
}
validate
:visibility_level_allowed_by_projects
validate
:visibility_level_allowed_by_projects
...
...
spec/ee/spec/models/ee/project_spec.rb
View file @
8882da71
...
@@ -16,7 +16,7 @@ describe Project do
...
@@ -16,7 +16,7 @@ describe Project do
it
{
is_expected
.
to
have_many
(
:path_locks
)
}
it
{
is_expected
.
to
have_many
(
:path_locks
)
}
it
{
is_expected
.
to
have_many
(
:sourced_pipelines
)
}
it
{
is_expected
.
to
have_many
(
:sourced_pipelines
)
}
it
{
is_expected
.
to
have_many
(
:source_pipelines
)
}
it
{
is_expected
.
to
have_many
(
:source_pipelines
)
}
it
{
is_expected
.
to
have_many
(
:audit_events
)
}
it
{
is_expected
.
to
have_many
(
:audit_events
)
.
dependent
(
false
)
}
end
end
describe
'.mirrors_to_sync'
do
describe
'.mirrors_to_sync'
do
...
...
spec/models/group_spec.rb
View file @
8882da71
...
@@ -18,6 +18,7 @@ describe Group do
...
@@ -18,6 +18,7 @@ describe Group do
it
{
is_expected
.
to
have_many
(
:uploads
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_many
(
:uploads
).
dependent
(
:destroy
)
}
it
{
is_expected
.
to
have_one
(
:chat_team
)
}
it
{
is_expected
.
to
have_one
(
:chat_team
)
}
it
{
is_expected
.
to
have_many
(
:custom_attributes
).
class_name
(
'GroupCustomAttribute'
)
}
it
{
is_expected
.
to
have_many
(
:custom_attributes
).
class_name
(
'GroupCustomAttribute'
)
}
it
{
is_expected
.
to
have_many
(
:audit_events
).
dependent
(
false
)
}
describe
'#members & #requesters'
do
describe
'#members & #requesters'
do
let
(
:requester
)
{
create
(
:user
)
}
let
(
:requester
)
{
create
(
:user
)
}
...
...
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