tests for 57cf2989 fixing #1070

This commit is contained in:
Peter Bhat Harkins 2022-03-23 07:29:31 -05:00
parent 57cf2989ba
commit d08117b3e5
1 changed files with 9 additions and 0 deletions

View File

@ -5,12 +5,21 @@ describe 'tag routing' do
assert_recognizes({ controller: 'home', action: 'single_tag', tag: 'foo' }, '/t/foo')
end
it 'routes a single tag rss feed' do
assert_recognizes({ controller: 'home', action: 'single_tag', tag: 'foo', format: 'rss' }, '/t/foo.rss')
end
it 'routes multiple tags' do
assert_recognizes({ controller: 'home', action: 'multi_tag', tag: 'foo,bar' }, '/t/foo,bar')
end
it 'routes multiple tags rss feed' do
assert_recognizes({ controller: 'home', action: 'multi_tag', tag: 'foo,bar', format: 'rss' }, '/t/foo,bar.rss')
end
# ONE tag has gotta be clever
it 'routes the c++ tag' do
assert_recognizes({ controller: 'home', action: 'single_tag', tag: 'c++' }, '/t/c++')
assert_recognizes({ controller: 'home', action: 'single_tag', tag: 'c++', format: 'rss' }, '/t/c++.rss')
end
end