wiki pages: fix error in /wiki_pages/does_not_exist.json

This commit is contained in:
evazion
2019-08-13 21:30:21 -05:00
parent f6b737103a
commit 0f98631908
2 changed files with 17 additions and 10 deletions

View File

@@ -48,11 +48,16 @@ class WikiPagesControllerTest < ActionDispatch::IntegrationTest
assert_response :success
end
should "redirect for a nonexistent title" do
get wiki_page_path(:id => "what")
should "redirect html requests for a nonexistent title" do
get wiki_page_path("what")
assert_redirected_to(show_or_new_wiki_pages_path(title: "what"))
end
should "return 404 to api requests for a nonexistent title" do
get wiki_page_path("what"), as: :json
assert_response 404
end
should "render for a negated tag" do
as_user do
@wiki_page.update(title: "-aaa")