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
a09074e9
Commit
a09074e9
authored
Aug 10, 2020
by
Giorgenes Gelatti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup package code to remove license reference
parent
d242cf09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
13 deletions
+9
-13
spec/features/projects/settings/packages_settings_spec.rb
spec/features/projects/settings/packages_settings_spec.rb
+4
-6
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+5
-7
No files found.
spec/features/projects/settings/packages_settings_spec.rb
View file @
a09074e9
...
...
@@ -16,13 +16,11 @@ RSpec.describe 'Projects > Settings > Packages', :js do
allow
(
Gitlab
.
config
.
packages
).
to
receive
(
:enabled
).
and_return
(
true
)
end
context
'without the need for a license'
do
it
'displays the packages toggle button'
do
visit
edit_project_path
(
project
)
it
'displays the packages toggle button'
do
visit
edit_project_path
(
project
)
expect
(
page
).
to
have_content
(
'Packages'
)
expect
(
page
).
to
have_selector
(
'input[name="project[packages_enabled]"] + button'
,
visible:
true
)
end
expect
(
page
).
to
have_content
(
'Packages'
)
expect
(
page
).
to
have_selector
(
'input[name="project[packages_enabled]"] + button'
,
visible:
true
)
end
end
...
...
spec/requests/api/projects_spec.rb
View file @
a09074e9
...
...
@@ -2361,14 +2361,12 @@ RSpec.describe API::Projects do
expect
(
project
.
packages_enabled
).
to
be
true
end
context
'without the need for a license'
do
it
'disables project packages feature'
do
put
(
api
(
"/projects/
#{
project
.
id
}
"
,
user
),
params:
{
packages_enabled:
false
})
it
'disables project packages feature'
do
put
(
api
(
"/projects/
#{
project
.
id
}
"
,
user
),
params:
{
packages_enabled:
false
})
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
project
.
reload
.
packages_enabled
).
to
be
false
expect
(
json_response
[
'packages_enabled'
]).
to
eq
(
false
)
end
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
project
.
reload
.
packages_enabled
).
to
be
false
expect
(
json_response
[
'packages_enabled'
]).
to
eq
(
false
)
end
end
...
...
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