Rose::DBx::Object::I18N. Rename due to CPAN convention. Documentation. Preparing...
[blog.pm-common-perl-mods.git] / Rose-DBx-Object-I18N / t / delete.t
blob066991349864742727229fe22a3ac66e9edb0154
1 #!/usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More 'tests' => 4;
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 => 'qqqq',
20 orig_lang => 'ru',
21 signature => 'hello'
23 $u->save();
25 $u = User->new( id => $u->id );
26 $u->load();
27 my @i18n = @{ $u->user_i18n };
29 $u->delete( cascade => 1 );
31 $u = User->new( id => $u->id );
32 $u->load( speculative => 1 );
33 ok( $u->not_found );
35 foreach my $i18n ( @i18n ) {
36 $u = UserI18N->new( i18nid => $i18n->i18nid );
37 $u->load( speculative => 1 );
38 ok( $u->not_found );