root/branches/new-install-process/t/61_bug_textareas.t
| Revision 956, 0.9 kB (checked in by earle, 22 months ago) | |
|---|---|
|
|
| Line | |
|---|---|
| 1 | use Wiki::Toolkit::Setup::SQLite; |
| 2 | use OpenGuides::Template; |
| 3 | use OpenGuides::Test; |
| 4 | use OpenGuides::Utils; |
| 5 | use Test::More; |
| 6 | |
| 7 | eval { require DBD::SQLite; }; |
| 8 | |
| 9 | if ( $@ ) { |
| 10 | my ($error) = $@ =~ /^(.*?)\n/; |
| 11 | plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)"; |
| 12 | } |
| 13 | |
| 14 | plan tests => 1; |
| 15 | |
| 16 | Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } ); |
| 17 | my $config = OpenGuides::Test->make_basic_config; |
| 18 | my $wiki = OpenGuides::Utils->make_wiki_object( config => $config ); |
| 19 | |
| 20 | my $out = OpenGuides::Template->output( |
| 21 | wiki => $wiki, |
| 22 | config => $config, |
| 23 | template => "edit_form.tt", |
| 24 | vars => { |
| 25 | locales => [ |
| 26 | { name => "Barville" }, |
| 27 | { name => "Fooville" }, |
| 28 | ], |
| 29 | }, |
| 30 | ); |
| 31 | |
| 32 | like( $out, qr/Barville\nFooville/, |
| 33 | "locales properly separated in textarea" ); |
Note: See TracBrowser
for help on using the browser.
