repo.or.cz
/
blog.pm-common-perl-mods.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Test fix.
[blog.pm-common-perl-mods.git]
/
Rose-DB-Object-I18N
/
t
/
load-with-i18n.t
blob
0aa501600ddc27ad764976a78d88e76715b9c5b4
1
#! /usr/bin/perl
2
3
use
strict
;
4
use
warnings
;
5
6
use
Test
::
More
'tests'
=>
2
;
7
8
use
lib
't/lib'
;
9
10
use
NewDB
;
11
use
User
;
12
use
User
::
Manager
;
13
14
my
$db
=
NewDB
->
new
();
15
16
$db
->
init
();
17
18
my
$u
=
User
->
new
(
19
name
=>
'john'
,
20
orig_lang
=>
'en'
,
21
signature
=>
'hello'
22
);
23
$u
->
save
();
24
my
$id
=
$u
->
id
;
25
26
$u
=
User
->
new
(
id
=>
$id
);
27
$u
->
load
(
i18n
=>
'ru'
);
28
29
is
(
$u
->
name
,
'john'
);
30
31
is
(
$u
->
i18n
->
lang
,
'ru'
);
32
33
$u
->
delete
(
cascade
=>
1
);
34
35
1
;