2011-06-22 15:53:29 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2011-06-28 13:38:13 +00:00
|
|
|
describe 'Locomotive::Middlewares::SeoTrailingSlash' do
|
|
|
|
|
2011-06-22 15:53:29 +00:00
|
|
|
it 'does not process the "/" url' do
|
|
|
|
get '/'
|
|
|
|
response.status.should_not be(301)
|
|
|
|
end
|
|
|
|
|
2012-02-16 01:45:14 +00:00
|
|
|
it 'does not process the "/locomotive/" url' do
|
|
|
|
get '/locomotive/'
|
2011-06-22 15:53:29 +00:00
|
|
|
response.status.should_not be(301)
|
|
|
|
end
|
|
|
|
|
2012-02-16 01:45:14 +00:00
|
|
|
it 'does not process the "/locomotive/*" urls' do
|
|
|
|
get '/locomotive/login'
|
2011-06-22 15:53:29 +00:00
|
|
|
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
|
|
|
|
|
2011-11-26 06:24:34 +00:00
|
|
|
end
|