skip tests unless DBD::SQLite installed
[blog.pm-common-perl-mods.git] / Rose-DBx-Object-I18N / t / update-translation.t
bloba623c569ef2d061e212a1a47bb20b7c5ded15e13
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More;
8 eval "use DBD::SQLite";
9 plan skip_all => "DBD::SQLite is required to run this test" if $@;
11 plan 'tests' => 3;
13 use lib 't/lib';
15 use NewDB;
16 use User;
17 use User::Manager;
19 my $db = NewDB->new();
21 $db->init();
23 my $u = User->new(
24 name => '12345',
25 orig_lang => 'ru',
26 signature => 'hello'
28 $u->save();
30 $u->i18n('en')->signature( 'hi' );
31 $u->save();
33 is( $u->i18n->lang, 'en' );
35 is( $u->i18n->signature, 'hi' );
37 is( $u->i18n->istran, 1 );
39 $u->delete( cascade => 1 );