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
7c174603
Commit
7c174603
authored
3 years ago
by
Mark Lapierre
Committed by
Nikola Milojevic
3 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add undefined variable and use ! with destroy
parent
d4322db9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
spec/support/shared_examples/models/project_ci_cd_settings_shared_examples.rb
...examples/models/project_ci_cd_settings_shared_examples.rb
+3
-1
No files found.
spec/support/shared_examples/models/project_ci_cd_settings_shared_examples.rb
View file @
7c174603
# frozen_string_literal: true
# frozen_string_literal: true
RSpec
.
shared_examples
'ci_cd_settings delegation'
do
RSpec
.
shared_examples
'ci_cd_settings delegation'
do
let
(
:exclude_attributes
)
{
[]
}
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)
-
exclude_attributes
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
|
method
=
project
.
respond_to?
(
"ci_
#{
attr
}
"
)
?
"ci_
#{
attr
}
"
:
attr
method
=
project
.
respond_to?
(
"ci_
#{
attr
}
"
)
?
"ci_
#{
attr
}
"
:
attr
...
...
This diff is collapsed.
Click to expand it.
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