|
|
|
@ -185,13 +185,13 @@ class AppTest < MiniTest::Spec
|
|
|
|
|
it "works when the doc exists" do
|
|
|
|
|
get '/html~4-foo-bar_42/'
|
|
|
|
|
assert last_response.ok?
|
|
|
|
|
assert_includes last_response.body, 'app.DOC = {"name":"HTML","slug":"html~4"'
|
|
|
|
|
assert_includes last_response.body, 'data-doc="{"name":"HTML","slug":"html~4"'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it "works when the doc has no version in the path and a version exists" do
|
|
|
|
|
get '/html-foo-bar_42/'
|
|
|
|
|
assert last_response.ok?
|
|
|
|
|
assert_includes last_response.body, 'app.DOC = {"name":"HTML","slug":"html~5"'
|
|
|
|
|
assert_includes last_response.body, 'data-doc="{"name":"HTML","slug":"html~5"'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it "returns 404 when the type is blank" do
|
|
|
|
|