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
bb4076de
Commit
bb4076de
authored
Feb 20, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delegate last_pipeline to Project
parent
094d7408
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 @
bb4076de
...
@@ -305,6 +305,7 @@ class Project < ActiveRecord::Base
...
@@ -305,6 +305,7 @@ class Project < ActiveRecord::Base
delegate
:group_runners_enabled
,
:group_runners_enabled
=
,
:group_runners_enabled?
,
to: :ci_cd_settings
delegate
:group_runners_enabled
,
:group_runners_enabled
=
,
:group_runners_enabled?
,
to: :ci_cd_settings
delegate
:group_clusters_enabled?
,
to: :group
,
allow_nil:
true
delegate
:group_clusters_enabled?
,
to: :group
,
allow_nil:
true
delegate
:root_ancestor
,
to: :namespace
,
allow_nil:
true
delegate
:root_ancestor
,
to: :namespace
,
allow_nil:
true
delegate
:last_pipeline
,
to: :commit
,
allow_nil:
true
# Validations
# Validations
validates
:creator
,
presence:
true
,
on: :create
validates
:creator
,
presence:
true
,
on: :create
...
...
spec/models/project_spec.rb
View file @
bb4076de
...
@@ -458,6 +458,7 @@ describe Project do
...
@@ -458,6 +458,7 @@ describe Project do
it
{
is_expected
.
to
delegate_method
(
:name
).
to
(
:owner
).
with_prefix
(
true
).
with_arguments
(
allow_nil:
true
)
}
it
{
is_expected
.
to
delegate_method
(
:name
).
to
(
:owner
).
with_prefix
(
true
).
with_arguments
(
allow_nil:
true
)
}
it
{
is_expected
.
to
delegate_method
(
:group_clusters_enabled?
).
to
(
:group
).
with_arguments
(
allow_nil:
true
)
}
it
{
is_expected
.
to
delegate_method
(
:group_clusters_enabled?
).
to
(
:group
).
with_arguments
(
allow_nil:
true
)
}
it
{
is_expected
.
to
delegate_method
(
:root_ancestor
).
to
(
:namespace
).
with_arguments
(
allow_nil:
true
)
}
it
{
is_expected
.
to
delegate_method
(
:root_ancestor
).
to
(
:namespace
).
with_arguments
(
allow_nil:
true
)
}
it
{
is_expected
.
to
delegate_method
(
:last_pipeline
).
to
(
:commit
).
with_arguments
(
allow_nil:
true
)
}
end
end
describe
'#to_reference_with_postfix'
do
describe
'#to_reference_with_postfix'
do
...
...
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