123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- require './t/test.pl';
- package OddMuse;
- use Test::More tests => 6;
- AppendStringToFile($ConfigFile, "\$EditPass = 'bar';\n");
- test_page(update_page('test', 'normal edit'),
- 'normal edit');
- test_page(get_page('action=password'),
- 'You are a normal user on this site');
- WriteStringToFile($ConfigFile, <<'EOT');
- $EditAllowed = 2;
- $AdminPass = 'foo' unless defined $AdminPass;
- $EditPass = 'bar' unless defined $EditPass;
- $ScriptName = 'http://localhost/wiki.pl';
- $SurgeProtection = 0;
- $CommentsPrefix = 'Comments on ';
- $LocalNamesCollect = 1;
- EOT
- test_page(update_page('normal_page', 'normal edit'),
- 'This page does not exist');
- test_page(update_page('normal_page', 'admin edit', 0, 0, 1),
- 'This page does not exist');
- WriteStringToFile($ConfigFile, <<'EOT');
- $EditAllowed = 2;
- $AdminPass = 'foo';
- $EditPass = 'bar';
- $ScriptName = 'http://localhost/wiki.pl';
- $SurgeProtection = 0;
- $CommentsPrefix = 'Comments on ';
- $LocalNamesCollect = 1;
- EOT
- test_page(update_page('normal_page', 'normal edit'),
- 'This page does not exist');
- test_page(update_page('normal_page', 'admin edit', 0, 0, 1),
- 'admin edit');
|