Skip to content

Commit

Permalink
Adding browserconfig.xml as a static asset for catalog requests
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Jan 4, 2019
1 parent ab28e4d commit 728c16f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
match '/404', to: 'pages#not_found', via: :all
match '/500', to: 'pages#internal_server_error', via: :all
get '/viewers', to: 'pages#viewers', as: 'viewers_page'
get '/browserconfig.xml', to: redirect('/browserconfig.xml')
mount Spotlight::Engine, at: '/'

concern :exportable, Blacklight::Routes::Exportable.new
Expand Down
5 changes: 5 additions & 0 deletions public/browserconfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
</msapplication>
</browserconfig>
13 changes: 13 additions & 0 deletions spec/requests/catalog_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
require 'rails_helper'

RSpec.describe "catalog paths", type: :request do
describe "browserconfig.xml" do
it "routes to the browserconfig static XML asset" do
get "/browserconfig.xml"

expect(response.status).to eq 200
expect(response.body).not_to be_empty
expect(response.content_type).to eq "application/xml"
end
end
end

0 comments on commit 728c16f

Please sign in to comment.