skip tests unless DBD::SQLite installed
[blog.pm-common-perl-mods.git] / Rose-DBx-Object-I18N / t / update-translation-with-sync.t
bloba9744d341ff9334b0248149c0f8303b219797bf7
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;
18 my $db = NewDB->new();
20 $db->init();
22 my $u = User->new(
23 name => '12345a',
24 orig_lang => 'ru',
25 signature => 'hallo'
27 $u->save();
29 $u->i18n->signature( 'wow' );
30 $u->save();
31 is( $u->i18n( 'ru' )->signature, 'wow' );
33 is( $u->i18n( 'en' )->istran, 0 );
35 is( $u->i18n->signature, 'wow' );
37 $u->delete( cascade => 1 );