-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from crosscite/upgrade_to_6
Upgrade to 6.0 and 6.1
- Loading branch information
Showing
5 changed files
with
156 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe 'Index routing', type: :routing do | ||
it 'routes GET / to index#index' do | ||
expect(get: '/').to route_to(controller: 'index', action: 'index') | ||
end | ||
|
||
it 'routes GET /index to index#show' do | ||
expect(get: '/index').to route_to(controller: 'index', action: 'show', id: 'index') | ||
end | ||
|
||
it 'does not route GET /index.xml to index#show' do | ||
expect(get: '/index.xml').not_to route_to(controller: 'index', action: 'show', id: 'index', format: 'xml') | ||
end | ||
|
||
it 'routes GET /custom_id to index#show with custom_id' do | ||
expect(get: '/custom_id').to route_to(controller: 'index', action: 'show', id: 'custom_id') | ||
end | ||
|
||
it 'does not route GET /custom_id.xml to index#show with custom_id and xml format' do | ||
expect(get: '/custom_id.xml').not_to route_to(controller: 'index', action: 'show', id: 'custom_id', format: 'xml') | ||
end | ||
|
||
it 'routes GET / with format: false to index#index' do | ||
expect(get: '/', constraints: { format: false }).to route_to(controller: 'index', action: 'index') | ||
end | ||
|
||
it 'does not route GET /index.xml with format: false to index#show' do | ||
expect(get: '/index.xml', constraints: { format: false }).not_to route_to(controller: 'index', action: 'show', id: 'index', format: 'xml') | ||
end | ||
|
||
it 'does not route GET /custom_id.xml with format: false to index#show with custom_id' do | ||
expect(get: '/custom_id.xml', constraints: { format: false }).not_to route_to(controller: 'index', action: 'show', id: 'custom_id', format: 'xml') | ||
end | ||
end |