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
ed7db880
Commit
ed7db880
authored
Oct 25, 2021
by
Andrea Galbusera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test to expose cascading framework issue
parent
5612e4e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
spec/models/concerns/cascading_namespace_setting_attribute_spec.rb
...ls/concerns/cascading_namespace_setting_attribute_spec.rb
+15
-0
No files found.
spec/models/concerns/cascading_namespace_setting_attribute_spec.rb
View file @
ed7db880
...
...
@@ -136,6 +136,21 @@ RSpec.describe NamespaceSetting, 'CascadingNamespaceSettingAttribute' do
.
to
raise_error
(
ActiveRecord
::
RecordInvalid
,
/Delayed project removal cannot be changed because it is locked by an ancestor/
)
end
end
context
'when parent locked the attribute then the application settings locks it'
do
before
do
subgroup_settings
.
update!
(
delayed_project_removal:
true
)
group_settings
.
update!
(
lock_delayed_project_removal:
true
,
delayed_project_removal:
false
)
stub_application_setting
(
lock_delayed_project_removal:
true
,
delayed_project_removal:
true
)
subgroup_settings
.
clear_memoization
(
:delayed_project_removal
)
subgroup_settings
.
clear_memoization
(
:delayed_project_removal_locked_ancestor
)
end
it
'returns the application setting value'
do
expect
(
delayed_project_removal
).
to
eq
(
true
)
end
end
end
describe
'#delayed_project_removal?'
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