|
Revision 785, 1.0 kB
(checked in by dom, 3 years ago)
|
|
Use Wiki::Toolkit. Note that CGI::Wiki::Plugin::Diff hasn't been converted yet,
so tests will be broken for now.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | use Wiki::Toolkit::Setup::SQLite; |
|---|
| 2 | use OpenGuides::Template; |
|---|
| 3 | use OpenGuides::Test; |
|---|
| 4 | use OpenGuides::Utils; |
|---|
| 5 | use Test::More tests => 1; |
|---|
| 6 | |
|---|
| 7 | eval { require DBD::SQLite; }; |
|---|
| 8 | my $have_sqlite = $@ ? 0 : 1; |
|---|
| 9 | |
|---|
| 10 | SKIP: { |
|---|
| 11 | skip "DBD::SQLite not installed - no database to test with", 1 |
|---|
| 12 | unless $have_sqlite; |
|---|
| 13 | |
|---|
| 14 | Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); |
|---|
| 15 | my $config = OpenGuides::Test->make_basic_config; |
|---|
| 16 | my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); |
|---|
| 17 | |
|---|
| 18 | my $out = OpenGuides::Template->output( |
|---|
| 19 | wiki => $wiki, |
|---|
| 20 | config => $config, |
|---|
| 21 | template => "edit_form.tt", |
|---|
| 22 | vars => { |
|---|
| 23 | locales => [ |
|---|
| 24 | { name => "Barville" }, |
|---|
| 25 | { name => "Fooville" }, |
|---|
| 26 | ], |
|---|
| 27 | }, |
|---|
| 28 | ); |
|---|
| 29 | |
|---|
| 30 | like( $out, qr/Barville\nFooville/, |
|---|
| 31 | "locales properly separated in textarea" ); |
|---|
| 32 | } |
|---|
| 33 | |
|---|