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

Last change on this file since 587 was 565, checked in by kake, 17 years ago

Take out some more common testing code into OpenGuides::Test - make_basic_config

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 967 bytes
Line 
1use CGI::Wiki::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    CGI::Wiki::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.