Skip to content
This repository was archived by the owner on Oct 27, 2022. It is now read-only.

Commit 311dd36

Browse files
authored
Merge pull request #945 from dmann/DDS-815-config_root_redirect
DDS-815 config root redirect
2 parents f903445 + ae1a2e4 commit 311dd36

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

config/routes.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Rails.application.routes.draw do
22
mount DDS::Base, at: '/'
33
get "apiexplorer" => "swaggerui#index"
4+
root to: redirect("/apidocs", status: 302)
45
end

spec/routing/base_routing_spec.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require "rails_helper"
2+
3+
RSpec.describe "application base routes" do
4+
it { expect(get('/apiexplorer')).to route_to("swaggerui#index") }
5+
6+
it "root to apidocs", :type => :request do
7+
expect(get('/')).to eq(302)
8+
expect(response).to redirect_to('/apidocs')
9+
end
10+
end

0 commit comments

Comments
 (0)