Skip to content

Commit

Permalink
Adding support for Apple icons and Wordpress paths
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgriffiniii committed Jan 4, 2019
1 parent 728c16f commit 3ce5c5e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +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')
get '/wp-login.php', to: redirect('/')
mount Spotlight::Engine, at: '/'

concern :exportable, Blacklight::Routes::Exportable.new
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions spec/requests/catalog_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,32 @@
expect(response.content_type).to eq "application/xml"
end
end
describe "Apple touch icons" do
it "routes to the static PNG assets" do
get "/apple-touch-icon.png"

expect(response.status).to eq 200
expect(response.body).to be_empty
get "/apple-touch-icon-precomposed.png"

expect(response.status).to eq 200
expect(response.body).to be_empty
get "/apple-touch-icon-120x120.png"

expect(response.status).to eq 200
expect(response.body).to be_empty
get "/apple-touch-icon-120x120-precomposed.png"

expect(response.status).to eq 200
expect(response.body).to be_empty
end
end
describe "wp-login.php" do
it "redirects to the catalog index" do
get "/wp-login.php"

expect(response.status).to eq 301
expect(response).to redirect_to("/")
end
end
end

0 comments on commit 3ce5c5e

Please sign in to comment.