2014-08-30 17:38:47 +00:00
|
|
|
require 'rails_helper'
|
2014-03-05 09:05:45 +00:00
|
|
|
|
|
|
|
describe "asciicasts routing" do
|
|
|
|
|
|
|
|
it 'routes /a/1 to asciicasts#show' do
|
|
|
|
expect(get: '/a/1').to route_to(
|
|
|
|
controller: 'asciicasts',
|
|
|
|
action: 'show',
|
|
|
|
id: '1',
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
# legacy route, kept for backwards compatibility with old embeds
|
2017-06-16 08:34:18 +00:00
|
|
|
it 'routes /a/1/raw to asciicasts#embed' do
|
2014-03-05 09:05:45 +00:00
|
|
|
expect(get: '/a/1/raw').to route_to(
|
2017-06-16 08:34:18 +00:00
|
|
|
controller: 'asciicasts',
|
|
|
|
action: 'embed',
|
2014-03-05 09:05:45 +00:00
|
|
|
id: '1',
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|