Dont' commit when nothing was changed.
[blog.pm-common-perl-mods.git] / Rose-DB-Object-I18N / t / delete-i18n.t
blob12e5297324e094a6cc64e94931e451fe518e7039
1 #! /usr/bin/perl
3 use strict;
4 use warnings;
6 use Test::More 'tests' => 3;
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 => 'qqqqa',
20 orig_lang => 'ru',
21 signature => 'hello'
23 $u->save();
25 $u->load_i18n( language => 'en' );
26 $u->i18n->signature( 'hallo' );
27 $u->save();
28 is( $u->i18n->istran, 1 );
30 $u->delete_i18n();
31 is( $u->i18n->istran, 0 );
33 is( $u->i18n->signature, 'hello' );
35 $u->delete( cascade => 1 );