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

Last change on this file since 949 was 949, checked in by Earle Martin, 15 years ago

Use skip_all for tests relying entirely on SQLite, instead of issuing skip commands with duplicate test counts and causing maintenance overhead.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 959 bytes
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    plan skip_all => "DBD::SQLite not installed - no database to test with";
11} else {
12    plan tests => 1;
13}
14
15SKIP: {
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" );
34}
35
36
Note: See TracBrowser for help on using the repository browser.