wiki pages: fix error in new controller action.
This commit is contained in:
@@ -166,7 +166,7 @@ class WikiPage < ApplicationRecord
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.is_meta_wiki?(title)
|
def self.is_meta_wiki?(title)
|
||||||
title.starts_with?(*META_WIKIS)
|
title.present? && title.starts_with?(*META_WIKIS)
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_meta_wiki?
|
def is_meta_wiki?
|
||||||
|
|||||||
@@ -92,6 +92,11 @@ class WikiPagesControllerTest < ActionDispatch::IntegrationTest
|
|||||||
get_auth new_wiki_page_path, @mod, params: { wiki_page: { title: "test" }}
|
get_auth new_wiki_page_path, @mod, params: { wiki_page: { title: "test" }}
|
||||||
assert_response :success
|
assert_response :success
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "render without a title" do
|
||||||
|
get_auth new_wiki_page_path, @mod
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context "edit action" do
|
context "edit action" do
|
||||||
|
|||||||
Reference in New Issue
Block a user