Corrected WikiReference::link_type when a newly created page refers to itself (should be 'L', not 'W')
This commit is contained in:
parent
cd68db01d2
commit
0c6626c375
2 changed files with 14 additions and 3 deletions
|
@ -328,13 +328,18 @@ class PageRendererTest < Test::Unit::TestCase
|
|||
|
||||
# Tests for the caching of wiki references and categories
|
||||
def test_references_creation
|
||||
new_page = @web.add_page('NewPage', 'HomePage',
|
||||
new_page = @web.add_page('NewPage', 'HomePage NewPage',
|
||||
Time.local(2004, 4, 4, 16, 50), 'AlexeyVerkhovsky', test_renderer)
|
||||
|
||||
references = new_page.wiki_references(true)
|
||||
assert_equal 1, references.size
|
||||
assert_equal 2, references.size
|
||||
assert_equal 'HomePage', references[0].referenced_page_name
|
||||
assert_equal WikiReference::LINKED_PAGE, references[0].link_type
|
||||
assert_equal 'NewPage', references[1].referenced_page_name
|
||||
assert_equal WikiReference::LINKED_PAGE, references[1].link_type
|
||||
end
|
||||
|
||||
def test_rendering_changes_references_from_wanted_to_linked
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue