root/trunk/t/61_bug_textareas.t

Revision 956, 0.9 kB (checked in by earle, 20 months ago)

Complete transition to using skip_all (remove old SKIP blocks).
More verbose reporting for error "require"ing DBD::SQLite.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1use Wiki::Toolkit::Setup::SQLite;
2use OpenGuides::Template;
3use OpenGuides::Test;
4use OpenGuides::Utils;
5use Test::More;
6
7eval { require DBD::SQLite; };
8
9if ( $@ ) {
10    my ($error) = $@ =~ /^(.*?)\n/;
11    plan skip_all => "DBD::SQLite could not be used - no database to test with ($error)";
12}
13
14plan tests => 1;
15
16Wiki::Toolkit::Setup::SQLite::setup( { dbname => "t/node.db" } );
17my $config = OpenGuides::Test->make_basic_config;
18my $wiki = OpenGuides::Utils->make_wiki_object( config => $config );
19
20my $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
32like( $out, qr/Barville\nFooville/,
33     "locales properly separated in textarea" );
Note: See TracBrowser for help on using the browser.