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
d4322db9
Commit
d4322db9
authored
Jun 23, 2021
by
Mark Lapierre
Committed by
Nikola Milojevic
Jun 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip attributes defined in EE code
parent
3d378065
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
spec/models/project_spec.rb
spec/models/project_spec.rb
+10
-1
spec/support/shared_examples/models/project_ci_cd_settings_shared_examples.rb
...examples/models/project_ci_cd_settings_shared_examples.rb
+1
-1
No files found.
spec/models/project_spec.rb
View file @
d4322db9
...
@@ -658,7 +658,16 @@ RSpec.describe Project, factory_default: :keep do
...
@@ -658,7 +658,16 @@ RSpec.describe Project, factory_default: :keep do
it
{
is_expected
.
to
delegate_method
(
:container_registry_enabled?
).
to
(
:project_feature
)
}
it
{
is_expected
.
to
delegate_method
(
:container_registry_enabled?
).
to
(
:project_feature
)
}
it
{
is_expected
.
to
delegate_method
(
:container_registry_access_level
).
to
(
:project_feature
)
}
it
{
is_expected
.
to
delegate_method
(
:container_registry_access_level
).
to
(
:project_feature
)
}
include_examples
'ci_cd_settings delegation'
include_examples
'ci_cd_settings delegation'
do
# Skip attributes defined in EE code
let
(
:exclude_attributes
)
do
%w(
merge_pipelines_enabled
merge_trains_enabled
auto_rollback_enabled
)
end
end
describe
'#ci_forward_deployment_enabled?'
do
describe
'#ci_forward_deployment_enabled?'
do
it_behaves_like
'a ci_cd_settings predicate method'
,
prefix:
'ci_'
do
it_behaves_like
'a ci_cd_settings predicate method'
,
prefix:
'ci_'
do
...
...
spec/support/shared_examples/models/project_ci_cd_settings_shared_examples.rb
View file @
d4322db9
...
@@ -4,7 +4,7 @@ RSpec.shared_examples 'ci_cd_settings delegation' do
...
@@ -4,7 +4,7 @@ RSpec.shared_examples 'ci_cd_settings delegation' do
context
'when ci_cd_settings is destroyed but project is not'
do
context
'when ci_cd_settings is destroyed but project is not'
do
it
'allows methods delegated to ci_cd_settings to be nil'
,
:aggregate_failures
do
it
'allows methods delegated to ci_cd_settings to be nil'
,
:aggregate_failures
do
project
=
create
(
:project
)
project
=
create
(
:project
)
attributes
=
project
.
ci_cd_settings
.
attributes
.
keys
-
%w(id project_id)
attributes
=
project
.
ci_cd_settings
.
attributes
.
keys
-
%w(id project_id)
-
exclude_attributes
project
.
ci_cd_settings
.
destroy
project
.
ci_cd_settings
.
destroy
project
.
reload
project
.
reload
attributes
.
each
do
|
attr
|
attributes
.
each
do
|
attr
|
...
...
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