engine/spec/requests/seo_trailing_slash_spec.rb
2012-02-16 02:45:14 +01:00

26 lines
550 B
Ruby

require 'spec_helper'
describe 'Locomotive::Middlewares::SeoTrailingSlash' do
it 'does not process the "/" url' do
get '/'
response.status.should_not be(301)
end
it 'does not process the "/locomotive/" url' do
get '/locomotive/'
response.status.should_not be(301)
end
it 'does not process the "/locomotive/*" urls' do
get '/locomotive/login'
response.status.should_not be(301)
end
it 'redirects to the url without the trailing slash' do
get '/hello_world/'
response.status.should be(301)
end
end