Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /spec/routing
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/admin_routing_spec.rb11
-rw-r--r--spec/routing/project_routing_spec.rb7
-rw-r--r--spec/routing/uploads_routing_spec.rb11
3 files changed, 27 insertions, 2 deletions
diff --git a/spec/routing/admin_routing_spec.rb b/spec/routing/admin_routing_spec.rb
index 8c36d7d4668..f48b4de23a2 100644
--- a/spec/routing/admin_routing_spec.rb
+++ b/spec/routing/admin_routing_spec.rb
@@ -134,10 +134,17 @@ RSpec.describe Admin::HealthCheckController, "routing" do
end
end
-# admin_dev_ops_report GET /admin/dev_ops_report(.:format) admin/dev_ops_report#show
+# admin_dev_ops_reports GET /admin/dev_ops_reports(.:format) admin/dev_ops_report#show
RSpec.describe Admin::DevOpsReportController, "routing" do
it "to #show" do
- expect(get("/admin/dev_ops_report")).to route_to('admin/dev_ops_report#show')
+ expect(get("/admin/dev_ops_reports")).to route_to('admin/dev_ops_report#show')
+ end
+
+ describe 'admin devops reports' do
+ include RSpec::Rails::RequestExampleGroup
+ it 'redirects from /admin/dev_ops_report to /admin/dev_ops_reports' do
+ expect(get("/admin/dev_ops_report")).to redirect_to(admin_dev_ops_reports_path)
+ end
end
end
diff --git a/spec/routing/project_routing_spec.rb b/spec/routing/project_routing_spec.rb
index 65772895826..21012399edf 100644
--- a/spec/routing/project_routing_spec.rb
+++ b/spec/routing/project_routing_spec.rb
@@ -905,6 +905,13 @@ RSpec.describe 'project routing' do
)
end
+ it 'routes to 404 without format for invalid page' do
+ expect(get: "/gitlab/gitlabhq/-/metrics/invalid_page.md").to route_to(
+ 'application#route_not_found',
+ unmatched_route: 'gitlab/gitlabhq/-/metrics/invalid_page.md'
+ )
+ end
+
it 'routes to 404 with invalid dashboard_path' do
expect(get: "/gitlab/gitlabhq/-/metrics/invalid_dashboard").to route_to(
'application#route_not_found',
diff --git a/spec/routing/uploads_routing_spec.rb b/spec/routing/uploads_routing_spec.rb
index d1ddf8a6d6a..41646d1b515 100644
--- a/spec/routing/uploads_routing_spec.rb
+++ b/spec/routing/uploads_routing_spec.rb
@@ -21,6 +21,17 @@ RSpec.describe 'Uploads', 'routing' do
)
end
+ it 'allows fetching alert metric metric images' do
+ expect(get('/uploads/-/system/alert_management_metric_image/file/1/test.jpg')).to route_to(
+ controller: 'uploads',
+ action: 'show',
+ model: 'alert_management_metric_image',
+ id: '1',
+ filename: 'test.jpg',
+ mounted_as: 'file'
+ )
+ end
+
it 'does not allow creating uploads for other models' do
unroutable_models = UploadsController::MODEL_CLASSES.keys.compact - %w(personal_snippet user)