Files
mozo-backend/spec/routing/locale_routing_spec.rb

11 lines
675 B
Ruby

require "spec_helper"
describe "routing", type: :routing do
it('roots to pages#home'){get('/').should route_to('pages#home', locale: 'nl')}
it('roots to pages#home for en locale'){get('/en').should route_to('pages#home', locale: 'en')}
it('roots to pages#home for nl locale'){get('/nl').should route_to('pages#home', locale: 'nl')}
it('handles about page as root'){ get('/about').should route_to('pages#show', name: 'about', locale: 'nl')}
it('handles about page in nl'){ get('/nl/about').should route_to('pages#show', name: 'about', locale: 'nl')}
it('handles about page in en'){ get('/en/about').should route_to('pages#show', name: 'about', locale: 'en')}
end