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
f4acd78a
Commit
f4acd78a
authored
Apr 26, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract EE specific files/lines for spec/routing
Remove not needed comment Remove blank lines
parent
4d336ab5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
20 deletions
+21
-20
ee/spec/routing/admin_routing_spec.rb
ee/spec/routing/admin_routing_spec.rb
+10
-0
ee/spec/routing/project_routing_spec.rb
ee/spec/routing/project_routing_spec.rb
+11
-4
spec/routing/admin_routing_spec.rb
spec/routing/admin_routing_spec.rb
+0
-10
spec/routing/project_routing_spec.rb
spec/routing/project_routing_spec.rb
+0
-6
No files found.
ee/spec/routing/admin_routing_spec.rb
View file @
f4acd78a
...
@@ -49,4 +49,14 @@ describe 'EE-specific admin routing' do
...
@@ -49,4 +49,14 @@ describe 'EE-specific admin routing' do
expect
(
patch
(
"/admin/geo/nodes/
#{
geo_node
.
id
}
"
)).
to
route_to
(
'admin/geo/nodes#update'
,
id:
geo_node
.
to_param
)
expect
(
patch
(
"/admin/geo/nodes/
#{
geo_node
.
id
}
"
)).
to
route_to
(
'admin/geo/nodes#update'
,
id:
geo_node
.
to_param
)
end
end
end
end
describe
Admin
::
EmailsController
,
'routing'
do
it
'routes to #show'
do
expect
(
get
(
'/admin/email'
)).
to
route_to
(
'admin/emails#show'
)
end
it
'routes to #create'
do
expect
(
post
(
'/admin/email'
)).
to
route_to
(
'admin/emails#create'
)
end
end
end
end
ee/spec/routing/project_routing_spec.rb
View file @
f4acd78a
require
"spec_helper"
require
"spec_helper"
describe
'EE-specific project routing'
do
describe
'EE-specific project routing'
do
# project_vulnerability_feedback GET /:project_id/vulnerability_feedback(.:format) projects/vulnerability_feedback#index
# POST /:project_id/vulnerability_feedback(.:format) projects/vulnerability_feedback#create
# project_vulnerability_feedback DELETE /:project_id/vulnerability_feedback/:id(.:format) projects/vulnerability_feedback#destroy
describe
Projects
::
VulnerabilityFeedbackController
,
'routing'
,
type: :routing
do
before
do
before
do
allow
(
Project
).
to
receive
(
:find_by_full_path
).
with
(
'gitlab/gitlabhq'
,
any_args
).
and_return
(
true
)
allow
(
Project
).
to
receive
(
:find_by_full_path
).
with
(
'gitlab/gitlabhq'
,
any_args
).
and_return
(
true
)
end
end
# project_vulnerability_feedback GET /:project_id/vulnerability_feedback(.:format) projects/vulnerability_feedback#index
# POST /:project_id/vulnerability_feedback(.:format) projects/vulnerability_feedback#create
# project_vulnerability_feedback DELETE /:project_id/vulnerability_feedback/:id(.:format) projects/vulnerability_feedback#destroy
describe
Projects
::
VulnerabilityFeedbackController
,
'routing'
,
type: :routing
do
it
"to #index"
do
it
"to #index"
do
expect
(
get
(
"/gitlab/gitlabhq/vulnerability_feedback"
)).
to
route_to
(
'projects/vulnerability_feedback#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
expect
(
get
(
"/gitlab/gitlabhq/vulnerability_feedback"
)).
to
route_to
(
'projects/vulnerability_feedback#index'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
)
end
end
...
@@ -21,4 +21,11 @@ describe 'EE-specific project routing' do
...
@@ -21,4 +21,11 @@ describe 'EE-specific project routing' do
expect
(
delete
(
"/gitlab/gitlabhq/vulnerability_feedback/1"
)).
to
route_to
(
'projects/vulnerability_feedback#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'1'
)
expect
(
delete
(
"/gitlab/gitlabhq/vulnerability_feedback/1"
)).
to
route_to
(
'projects/vulnerability_feedback#destroy'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'1'
)
end
end
end
end
# security_namespace_project_pipeline GET /:project_id/pipelines/:id/security(.:format)
describe
Projects
::
PipelinesController
,
'routing'
do
it
'to #security'
do
expect
(
get
(
'/gitlab/gitlabhq/pipelines/12/security'
)).
to
route_to
(
'projects/pipelines#security'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'12'
)
end
end
end
end
spec/routing/admin_routing_spec.rb
View file @
f4acd78a
...
@@ -136,16 +136,6 @@ describe Admin::DashboardController, "routing" do
...
@@ -136,16 +136,6 @@ describe Admin::DashboardController, "routing" do
end
end
end
end
describe
Admin
::
EmailsController
,
"routing"
do
it
"to #show"
do
expect
(
get
(
"/admin/email"
)).
to
route_to
(
'admin/emails#show'
)
end
it
"to #create"
do
expect
(
post
(
"/admin/email"
)).
to
route_to
(
'admin/emails#create'
)
end
end
# admin_health_check GET /admin/health_check(.:format) admin/health_check#show
# admin_health_check GET /admin/health_check(.:format) admin/health_check#show
describe
Admin
::
HealthCheckController
,
"routing"
do
describe
Admin
::
HealthCheckController
,
"routing"
do
it
"to #show"
do
it
"to #show"
do
...
...
spec/routing/project_routing_spec.rb
View file @
f4acd78a
...
@@ -661,10 +661,4 @@ describe 'project routing' do
...
@@ -661,10 +661,4 @@ describe 'project routing' do
end
end
end
end
end
end
describe
Projects
::
PipelinesController
,
'routing'
do
it
'to #security'
do
expect
(
get
(
'/gitlab/gitlabhq/pipelines/12/security'
)).
to
route_to
(
'projects/pipelines#security'
,
namespace_id:
'gitlab'
,
project_id:
'gitlabhq'
,
id:
'12'
)
end
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