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
64775ced
Commit
64775ced
authored
Apr 02, 2019
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove EE-specific lines from Groups::UpdateService spec
parent
323959a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
25 deletions
+24
-25
ee/spec/services/groups/update_service_spec.rb
ee/spec/services/groups/update_service_spec.rb
+24
-0
spec/services/groups/update_service_spec.rb
spec/services/groups/update_service_spec.rb
+0
-25
No files found.
ee/spec/services/groups/update_service_spec.rb
View file @
64775ced
...
...
@@ -130,6 +130,30 @@ describe Groups::UpdateService, '#execute' do
end
end
context
'repository_size_limit assignment as Bytes'
do
let
(
:group
)
{
create
(
:group
,
:public
,
repository_size_limit:
0
)
}
context
'when param present'
do
let
(
:opts
)
{
{
repository_size_limit:
'100'
}
}
it
'converts from MB to Bytes'
do
update_group
(
group
,
user
,
opts
)
expect
(
group
.
reload
.
repository_size_limit
).
to
eql
(
100
*
1024
*
1024
)
end
end
context
'when param not present'
do
let
(
:opts
)
{
{
repository_size_limit:
''
}
}
it
'assign nil value'
do
update_group
(
group
,
user
,
opts
)
expect
(
group
.
reload
.
repository_size_limit
).
to
be_nil
end
end
end
def
update_group
(
group
,
user
,
opts
)
Groups
::
UpdateService
.
new
(
group
,
user
,
opts
).
execute
end
...
...
spec/services/groups/update_service_spec.rb
View file @
64775ced
...
...
@@ -82,31 +82,6 @@ describe Groups::UpdateService do
end
end
context
'repository_size_limit assignment as Bytes'
do
let
(
:group
)
{
create
(
:group
,
:public
,
repository_size_limit:
0
)
}
let
(
:service
)
{
described_class
.
new
(
group
,
user
,
opts
)
}
context
'when param present'
do
let
(
:opts
)
{
{
repository_size_limit:
'100'
}
}
it
'converts from MB to Bytes'
do
service
.
execute
expect
(
group
.
reload
.
repository_size_limit
).
to
eql
(
100
*
1024
*
1024
)
end
end
context
'when param not present'
do
let
(
:opts
)
{
{
repository_size_limit:
''
}
}
it
'assign nil value'
do
service
.
execute
expect
(
group
.
reload
.
repository_size_limit
).
to
be_nil
end
end
end
context
"unauthorized visibility_level validation"
do
let!
(
:service
)
{
described_class
.
new
(
internal_group
,
user
,
visibility_level:
99
)
}
before
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