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
4c5efa77
Commit
4c5efa77
authored
Jan 18, 2018
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove a duplicated spec describe block
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
9ef1d2a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
112 deletions
+0
-112
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+0
-112
No files found.
spec/models/namespace_spec.rb
View file @
4c5efa77
...
...
@@ -550,118 +550,6 @@ describe Namespace do
end
end
describe
'#share_with_group_lock with subgroups'
,
:nested_groups
do
context
'when creating a subgroup'
do
let
(
:subgroup
)
{
create
(
:group
,
parent:
root_group
)}
context
'under a parent with "Share with group lock" enabled'
do
let
(
:root_group
)
{
create
(
:group
,
share_with_group_lock:
true
)
}
it
'enables "Share with group lock" on the subgroup'
do
expect
(
subgroup
.
share_with_group_lock
).
to
be_truthy
end
end
context
'under a parent with "Share with group lock" disabled'
do
let
(
:root_group
)
{
create
(
:group
)
}
it
'does not enable "Share with group lock" on the subgroup'
do
expect
(
subgroup
.
share_with_group_lock
).
to
be_falsey
end
end
end
context
'when enabling the parent group "Share with group lock"'
do
let
(
:root_group
)
{
create
(
:group
)
}
let!
(
:subgroup
)
{
create
(
:group
,
parent:
root_group
)}
it
'the subgroup "Share with group lock" becomes enabled'
do
root_group
.
update!
(
share_with_group_lock:
true
)
expect
(
subgroup
.
reload
.
share_with_group_lock
).
to
be_truthy
end
end
context
'when disabling the parent group "Share with group lock" (which was already enabled)'
do
let
(
:root_group
)
{
create
(
:group
,
share_with_group_lock:
true
)
}
context
'and the subgroup "Share with group lock" is enabled'
do
let
(
:subgroup
)
{
create
(
:group
,
parent:
root_group
,
share_with_group_lock:
true
)}
it
'the subgroup "Share with group lock" does not change'
do
root_group
.
update!
(
share_with_group_lock:
false
)
expect
(
subgroup
.
reload
.
share_with_group_lock
).
to
be_truthy
end
end
context
'but the subgroup "Share with group lock" is disabled'
do
let
(
:subgroup
)
{
create
(
:group
,
parent:
root_group
)}
it
'the subgroup "Share with group lock" does not change'
do
root_group
.
update!
(
share_with_group_lock:
false
)
expect
(
subgroup
.
reload
.
share_with_group_lock?
).
to
be_falsey
end
end
end
# Note: Group transfers are not yet implemented
context
'when a group is transferred into a root group'
do
context
'when the root group "Share with group lock" is enabled'
do
let
(
:root_group
)
{
create
(
:group
,
share_with_group_lock:
true
)
}
context
'when the subgroup "Share with group lock" is enabled'
do
let
(
:subgroup
)
{
create
(
:group
,
share_with_group_lock:
true
)}
it
'the subgroup "Share with group lock" does not change'
do
subgroup
.
parent
=
root_group
subgroup
.
save!
expect
(
subgroup
.
share_with_group_lock
).
to
be_truthy
end
end
context
'when the subgroup "Share with group lock" is disabled'
do
let
(
:subgroup
)
{
create
(
:group
)}
it
'the subgroup "Share with group lock" becomes enabled'
do
subgroup
.
parent
=
root_group
subgroup
.
save!
expect
(
subgroup
.
share_with_group_lock
).
to
be_truthy
end
end
end
context
'when the root group "Share with group lock" is disabled'
do
let
(
:root_group
)
{
create
(
:group
)
}
context
'when the subgroup "Share with group lock" is enabled'
do
let
(
:subgroup
)
{
create
(
:group
,
share_with_group_lock:
true
)}
it
'the subgroup "Share with group lock" does not change'
do
subgroup
.
parent
=
root_group
subgroup
.
save!
expect
(
subgroup
.
share_with_group_lock
).
to
be_truthy
end
end
context
'when the subgroup "Share with group lock" is disabled'
do
let
(
:subgroup
)
{
create
(
:group
)}
it
'the subgroup "Share with group lock" does not change'
do
subgroup
.
parent
=
root_group
subgroup
.
save!
expect
(
subgroup
.
share_with_group_lock
).
to
be_falsey
end
end
end
end
end
describe
'#find_fork_of?'
do
let
(
:project
)
{
create
(
:project
,
:public
)
}
let!
(
:forked_project
)
{
fork_project
(
project
,
namespace
.
owner
,
namespace:
namespace
)
}
...
...
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