Test fix.
[blog.pm-common-perl-mods.git] / Rose-DB-Object-I18N / t / prefetch.t
blob8833cc8bacbce4a7cc577c22dc9eccf14bc58825
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 => 'barfoo',
20 orig_lang => 'en',
21 signature => 'hello'
23 $u->save();
24 my $id = $u->id;
26 $u = User->new( id => $id );
27 $u->load(
28 query => [ 't2.lang' => 'ru' ],
29 with => [ 'user_i18n' ]
32 is( $u->name, 'barfoo' );
34 is( $u->i18n->lang, 'ru' );
36 $u->delete( cascade => 1 );