Dont' commit when nothing was changed.
[blog.pm-common-perl-mods.git] / Rose-DB-Object-I18N / t / load-i18n-with-default-language.t
blob63533c4f63d675f6c104ab516785f591deae1ce6
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More 'tests' => 4;
8 use lib 't/lib';
10 use NewDB;
11 use User;
12 use User::Manager;
14 my $db = NewDB->new();
16 $db->init();
18 my $u = User->new(
19 name => 'uuu',
20 orig_lang => 'en',
21 signature => 'hello'
23 $u->save();
25 $u = User->new( id => $u->id );
26 $u->load();
27 ok( not defined $u->i18n );
29 ok( $u->load_i18n() );
31 is( $u->i18n->lang, 'en' );
33 is( $u->i18n->signature, 'hello' );
35 $u->delete( cascade => 1 );