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

Commit

Permalink
Merge pull request #945 from dmann/DDS-815-config_root_redirect
Browse files Browse the repository at this point in the history
DDS-815 config root redirect
  • Loading branch information
dmlond committed Mar 1, 2017
2 parents f903445 + ae1a2e4 commit 311dd36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/routes.rb
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
10 changes: 10 additions & 0 deletions spec/routing/base_routing_spec.rb
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

0 comments on commit 311dd36

Please sign in to comment.