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
skip tests unless DBD::SQLite installed
[blog.pm-common-perl-mods.git]
/
Rose-DBx-Object-I18N
/
t
/
update-original.t
blob
132809957593310994350b41fdf4896418d8a0b7
1
#!/usr/bin/perl
2
3
use
strict
;
4
use
warnings
;
5
6
use
Test
::
More
;
7
8
eval
"use DBD::SQLite"
;
9
plan skip_all
=>
"DBD::SQLite is required to run this test"
if
$
@
;
10
11
plan
'tests'
=>
3
;
12
13
use
lib
't/lib'
;
14
15
use
NewDB
;
16
use
User
;
17
use
User
::
Manager
;
18
19
my
$db
=
NewDB
->
new
();
20
21
$db
->
init
();
22
23
my
$u
=
User
->
new
(
24
name
=>
'abcde'
,
25
orig_lang
=>
'ru'
,
26
signature
=>
'hi'
27
);
28
$u
->
save
();
29
30
is
(
$u
->
name
,
'abcde'
);
31
32
is
(
$u
->
orig_lang
,
'ru'
);
33
34
$u
->
name
(
'fred'
);
35
$u
->
save
();
36
37
is
(
$u
->
i18n
->
istran
,
0
);
38
39
$u
->
delete
(
cascade
=>
1
);
40
41
1
;