This repository has been archived by the owner on Oct 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #945 from dmann/DDS-815-config_root_redirect
DDS-815 config root redirect
- Loading branch information
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
Rails.application.routes.draw do | ||
mount DDS::Base, at: '/' | ||
get "apiexplorer" => "swaggerui#index" | ||
root to: redirect("/apidocs", status: 302) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe "application base routes" do | ||
it { expect(get('/apiexplorer')).to route_to("swaggerui#index") } | ||
|
||
it "root to apidocs", :type => :request do | ||
expect(get('/')).to eq(302) | ||
expect(response).to redirect_to('/apidocs') | ||
end | ||
end |