summaryrefslogtreecommitdiff
path: root/spec/routing
diff options
context:
space:
mode:
authorDJ Mountney <david@twkie.net>2016-05-10 16:19:16 -0700
committerDJ Mountney <david@twkie.net>2016-05-10 16:19:16 -0700
commit0e0caf4d17c28b6b0f3488b25efa265ce2804cc4 (patch)
tree13d7c57892acf74c88b41fbac0188383169f20dd /spec/routing
parent160ef66d1bbbbc593516c7575d6b02ddb019c000 (diff)
downloadgitlab-ce-0e0caf4d17c28b6b0f3488b25efa265ce2804cc4.tar.gz
Add tests for the health check feature
Diffstat (limited to 'spec/routing')
-rw-r--r--spec/routing/admin_routing_spec.rb7
-rw-r--r--spec/routing/routing_spec.rb10
2 files changed, 17 insertions, 0 deletions
diff --git a/spec/routing/admin_routing_spec.rb b/spec/routing/admin_routing_spec.rb
index cd16a8e6322..b5ed8584c8a 100644
--- a/spec/routing/admin_routing_spec.rb
+++ b/spec/routing/admin_routing_spec.rb
@@ -118,3 +118,10 @@ describe Admin::DashboardController, "routing" do
expect(get("/admin")).to route_to('admin/dashboard#index')
end
end
+
+# admin_health_check GET /admin/health_check(.:format) admin/health_check#show
+describe Admin::HealthCheckController, "routing" do
+ it "to #show" do
+ expect(get("/admin/health_check")).to route_to('admin/health_check#show')
+ end
+end
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index 1527eddfa48..e4dfd4bca35 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -243,3 +243,13 @@ describe "Groups", "routing" do
expect(get('/1')).to route_to('namespaces#show', id: '1')
end
end
+
+describe HealthCheckController, 'routing' do
+ it 'to #index' do
+ expect(get('/health_check')).to route_to('health_check#index')
+ end
+
+ it 'also supports passing checks in the url' do
+ expect(get('/health_check/email')).to route_to('health_check#index', checks: 'email')
+ end
+end