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
c2eff648
Commit
c2eff648
authored
Mar 31, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
5a7cb7f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
33 deletions
+12
-33
spec/controllers/admin/application_settings_controller_spec.rb
...controllers/admin/application_settings_controller_spec.rb
+0
-21
spec/serializers/environment_entity_spec.rb
spec/serializers/environment_entity_spec.rb
+12
-12
No files found.
spec/controllers/admin/application_settings_controller_spec.rb
View file @
c2eff648
...
...
@@ -17,7 +17,6 @@ describe Admin::ApplicationSettingsController do
it
'updates the default_project_visibility for string value'
do
put
:update
,
application_setting:
{
default_project_visibility:
"20"
}
<<<<<<<
HEAD
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
default_project_visibility
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PUBLIC
)
...
...
@@ -98,26 +97,6 @@ describe Admin::ApplicationSettingsController do
expect
(
body
[
"version"
]).
to
eq
(
Gitlab
::
VERSION
)
expect
(
body
).
to
include
(
'counts'
)
expect
(
response
.
status
).
to
eq
(
200
)
=======
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
default_project_visibility
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PUBLIC
)
end
it
'update the restricted levels for string values'
do
put
:update
,
application_setting:
{
restricted_visibility_levels:
%w[10 20]
}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
restricted_visibility_levels
).
to
eq
([
10
,
20
])
end
it
'falls back to defaults when settings are omitted'
do
put
:update
,
application_setting:
{}
expect
(
response
).
to
redirect_to
(
admin_application_settings_path
)
expect
(
ApplicationSetting
.
current
.
default_project_visibility
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PRIVATE
)
expect
(
ApplicationSetting
.
current
.
restricted_visibility_levels
).
to
be_empty
>>>>>>>
ce
/
master
end
end
end
spec/serializers/environment_entity_spec.rb
View file @
c2eff648
...
...
@@ -16,17 +16,6 @@ describe EnvironmentEntity do
expect
(
subject
).
to
include
(
:id
,
:name
,
:state
,
:environment_path
)
end
<<<<<<<
HEAD
context
'with deployment service ready'
do
before
do
allow
(
environment
).
to
receive
(
:deployment_service_ready?
).
and_return
(
true
)
end
it
'exposes rollout_status_path'
do
expected
=
'/'
+
[
environment
.
project
.
full_path
,
'environments'
,
environment
.
id
,
'status.json'
].
join
(
'/'
)
expect
(
subject
[
:rollout_status_path
]).
to
eq
(
expected
)
=======
context
'metrics disabled'
do
before
do
allow
(
environment
).
to
receive
(
:has_metrics?
).
and_return
(
false
)
...
...
@@ -44,7 +33,18 @@ describe EnvironmentEntity do
it
'exposes metrics path'
do
expect
(
subject
).
to
include
(
:metrics_path
)
>>>>>>>
ce
/
master
end
end
context
'with deployment service ready'
do
before
do
allow
(
environment
).
to
receive
(
:deployment_service_ready?
).
and_return
(
true
)
end
it
'exposes rollout_status_path'
do
expected
=
'/'
+
[
environment
.
project
.
full_path
,
'environments'
,
environment
.
id
,
'status.json'
].
join
(
'/'
)
expect
(
subject
[
:rollout_status_path
]).
to
eq
(
expected
)
end
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