Rose::DBx::Object::I18N. Rename due to CPAN convention. Documentation. Preparing...
[blog.pm-common-perl-mods.git] / Rose-DBx-Object-I18N / t / load-with-i18n.t
blob0aa501600ddc27ad764976a78d88e76715b9c5b4
1 #! /usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More 'tests' => 2;
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 => 'john',
20 orig_lang => 'en',
21 signature => 'hello'
23 $u->save();
24 my $id = $u->id;
26 $u = User->new( id => $id );
27 $u->load( i18n => 'ru' );
29 is( $u->name, 'john' );
31 is( $u->i18n->lang, 'ru' );
33 $u->delete( cascade => 1 );