Rose::DBx::Object::I18N. Rename due to CPAN convention. Documentation. Preparing...
[blog.pm-common-perl-mods.git] / Rose-DBx-Object-I18N / t / load-i18n.t
blob1eff8118a5ad8a23399ca0905522dea90067b3d4
1 #! /usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More 'tests' => 9;
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 => 'foobar',
20 orig_lang => 'en',
21 signature => 'hello'
23 $u->save();
24 my $id = $u->id;
26 foreach my $lang ( @{ $u->languages } ) {
27 $u->load_i18n( language => $lang );
28 ok( $u->i18n );
30 is( $u->i18n->lang, $lang, );
32 is( $u->i18n->signature, 'hello', );
35 $u->delete( cascade => 1 );