source: trunk/t/61_bug_textareas.t @ 878

Last change on this file since 878 was 785, checked in by Dominic Hargreaves, 16 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
File size: 975 bytes
Line 
1use Wiki::Toolkit::Setup::SQLite;
2use OpenGuides::Template;
3use OpenGuides::Test;
4use OpenGuides::Utils;
5use Test::More tests => 1;
6
7eval { require DBD::SQLite; };
8my $have_sqlite = $@ ? 0 : 1;
9
10SKIP: {
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
34
Note: See TracBrowser for help on using the repository browser.