diff options
Diffstat (limited to 'spec/routing')
-rw-r--r-- | spec/routing/admin_routing_spec.rb | 20 | ||||
-rw-r--r-- | spec/routing/instance_statistics_routing_spec.rb | 4 | ||||
-rw-r--r-- | spec/routing/routing_spec.rb | 13 |
3 files changed, 28 insertions, 9 deletions
diff --git a/spec/routing/admin_routing_spec.rb b/spec/routing/admin_routing_spec.rb index 13e371ad68a..fedafff0d1b 100644 --- a/spec/routing/admin_routing_spec.rb +++ b/spec/routing/admin_routing_spec.rb @@ -134,6 +134,20 @@ RSpec.describe Admin::HealthCheckController, "routing" do end end +# admin_dev_ops_report GET /admin/dev_ops_report(.: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') + end +end + +# admin_cohorts GET /admin/cohorts(.:format) admin/cohorst#index +RSpec.describe Admin::CohortsController, "routing" do + it "to #index" do + expect(get("/admin/cohorts")).to route_to('admin/cohorts#index') + end +end + RSpec.describe Admin::GroupsController, "routing" do let(:name) { 'complex.group-namegit' } @@ -164,3 +178,9 @@ RSpec.describe Admin::SessionsController, "routing" do expect(post("/admin/session/destroy")).to route_to('admin/sessions#destroy') end end + +RSpec.describe Admin::PlanLimitsController, "routing" do + it "to #create" do + expect(post("/admin/plan_limits")).to route_to('admin/plan_limits#create') + end +end diff --git a/spec/routing/instance_statistics_routing_spec.rb b/spec/routing/instance_statistics_routing_spec.rb index 7793c5cce71..7eec807fb0b 100644 --- a/spec/routing/instance_statistics_routing_spec.rb +++ b/spec/routing/instance_statistics_routing_spec.rb @@ -5,7 +5,7 @@ require 'spec_helper' RSpec.describe 'Instance Statistics', 'routing' do include RSpec::Rails::RequestExampleGroup - it "routes '/-/instance_statistics' to dev ops score" do - expect(get('/-/instance_statistics')).to redirect_to('/-/instance_statistics/dev_ops_score') + it "routes '/-/instance_statistics' to dev ops report" do + expect(get('/-/instance_statistics')).to redirect_to('/admin/dev_ops_report') end end diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index af4becd980b..722e687838f 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -32,13 +32,6 @@ RSpec.describe UsersController, "routing" do expect(get("/users/User/snippets")).to route_to('users#snippets', username: 'User') end - # get all the ssh-keys of a user - it "to #get_keys" do - allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true) - - expect(get("/User.keys")).to route_to('users#ssh_keys', username: 'User') - end - it "to #calendar" do expect(get("/users/User/calendar")).to route_to('users#calendar', username: 'User') end @@ -193,6 +186,12 @@ RSpec.describe Profiles::KeysController, "routing" do it "to #destroy" do expect(delete("/profile/keys/1")).to route_to('profiles/keys#destroy', id: '1') end + + it "to #get_keys" do + allow_any_instance_of(::Constraints::UserUrlConstrainer).to receive(:matches?).and_return(true) + + expect(get("/foo.keys")).to route_to('profiles/keys#get_keys', username: 'foo') + end end # emails GET /emails(.:format) emails#index |