forked from github/kensanata.oddmuse
Various tests fixed
$WikiLinks changed default value and must therefore be provided. CSS class for intermap links changed.
This commit is contained in:
@@ -21,6 +21,7 @@ package OddMuse;
|
||||
use Test::More tests => 33;
|
||||
|
||||
AppendStringToFile($ConfigFile, "\$PageCluster = 'Cluster';\n");
|
||||
AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n");
|
||||
|
||||
update_page('ClusterIdea', 'This is just a page.', 'one');
|
||||
update_page('ClusterIdea', "This is just a page.\nBut somebody has to do it.", 'two');
|
||||
|
||||
@@ -33,6 +33,7 @@ test_page(get_page('action=browse id=HomePage username=AlexSchroeder'),
|
||||
test_page(get_page('action=browse id=HomePage username=Alex%20Schroeder'),
|
||||
'username=Alex Schroeder');
|
||||
AppendStringToFile($ConfigFile, "\$FreeLinks = 0;\n");
|
||||
AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n");
|
||||
test_page(get_page('action=browse id=HomePage username=Alex%20Schroeder'),
|
||||
'Invalid UserName Alex Schroeder: not saved');
|
||||
test_page(get_page('action=browse id=HomePage username=AlexSchroeder'),
|
||||
|
||||
@@ -23,6 +23,8 @@ add_module('creole.pl');
|
||||
# Permit testing of dash-style list markup.
|
||||
$CreoleDashStyleUnorderedLists = 1;
|
||||
|
||||
$WikiLinks = 1;
|
||||
|
||||
run_tests(split('\n',<<'EOT'));
|
||||
# one
|
||||
<ol><li>one</li></ol>
|
||||
|
||||
@@ -18,6 +18,7 @@ use Test::More tests => 77;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
add_module('namespaces.pl');
|
||||
AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n");
|
||||
|
||||
test_page_negative(get_page('/Test?username=alex'), 'Wiki Test: Test');
|
||||
|
||||
@@ -83,7 +84,7 @@ xpath_test(get_page('action=browse id=Goo ns=Ford oldid=Muu:Mu'),
|
||||
'//div[@class="message"]/p[contains(text(),"redirected from")]/a[@class="edit"][@title="Click to edit this page"][@href="http://localhost/wiki.pl/Muu?action=edit;id=Mu"][text()="Muu:Mu"]');
|
||||
# check Main:Mu and verify that only a single redirection hop is allowed
|
||||
xpath_test(get_page('action=browse id=Mu ns=Muu oldid=Main:Mu'),
|
||||
'//div/p[contains(text(),"#REDIRECT")]/a[@href="http://localhost/wiki.pl/Ford/Goo"][@class="inter Ford"]/span[@class="site"][text()="Ford"]/following-sibling::span[@class="page"][text()="Goo"]');
|
||||
'//div/p[contains(text(),"#REDIRECT")]/a[@href="http://localhost/wiki.pl/Ford/Goo"][@class="inter Ford"]/span[@class="site"][text()="Ford"]/following-sibling::span[@class="interpage"][text()="Goo"]');
|
||||
# redirecting back to the Main namespace is different, so test separately
|
||||
test_page(update_page('BackHome', '#REDIRECT Main:HomePage', undef, undef, undef, 'ns=Muu'),
|
||||
'Status: 302',
|
||||
|
||||
@@ -17,6 +17,7 @@ package OddMuse;
|
||||
use Test::More tests => 16;
|
||||
|
||||
add_module('near-links.pl');
|
||||
AppendStringToFile($ConfigFile, "\$WikiLinks = 1;\n");
|
||||
|
||||
CreateDir($NearDir);
|
||||
WriteStringToFile("$NearDir/EmacsWiki", "AlexSchroeder\nFooBar\n"
|
||||
|
||||
Reference in New Issue
Block a user