123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- package OddMuse;
- use Test::More;
- use Test::Mojo;
- use utf8;
- require './t/test.pl';
- add_module('namespaces.pl');
- start_mojolicious_server();
- sleep(1);
- my $t = Test::Mojo->new;
- $t->get_ok("$ScriptName?action=version")
- ->content_like(qr/namespaces\.pl/);
- $t->post_ok("$ScriptName"
- => form => {title => 'Some_Page',
- text => 'This is the Main namespace.'})
- ->status_is(302);
- $t->get_ok("$ScriptName/Some_Page")
- ->status_is(200)
- ->content_like(qr/This is the Main namespace/);
- $t->post_ok("$ScriptName/FiveWinds"
- => form => {title => 'Some_Page',
- text => 'This is the Five Winds namespace.'})
- ->status_is(302);
- $t->get_ok("$ScriptName/FiveWinds/Some_Page")
- ->status_is(200)
- ->content_like(qr/This is the Five Winds namespace/);
- $t->get_ok("$ScriptName/Some_Page")
- ->content_like(qr/This is the Main namespace/);
- $t->post_ok("$ScriptName/F%C3%BCnfWinde"
- => form => {title => 'Some_Page',
- text => 'Wir sind im Namensraum Fünf Winde.'})
- ->status_is(302);
- $t->get_ok("$ScriptName/F%C3%BCnfWinde/Some_Page")
- ->status_is(200)
- ->content_like(qr/Wir sind im Namensraum Fünf Winde/);
- ok(IsDir("$DataDir/FünfWinde"), '$DataDir FünfWinde exists');
- $t->post_ok("$ScriptName/F%C3%BCnfWinde"
- => form => {title => 'Zürich',
- text => 'Wir sind immer noch im Namensraum Fünf Winde.'})
- ->status_is(302);
- $t->get_ok("$ScriptName/F%C3%BCnfWinde/Z%c3%bcrich")
- ->status_is(200)
- ->content_like(qr/Wir sind immer noch im Namensraum Fünf Winde/);
- done_testing();
|