Dont' commit when nothing was changed.
[blog.pm-common-perl-mods.git] / Rose-DB-Object-I18N / t / available-translations-after-prefetch.t
blobc2b796108cedb236fe365a5fc7dbb5c8004e6628
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 => 'ppp',
20 orig_lang => 'ru',
21 signature => 'hello'
23 $u->save();
25 $u->load( i18n => 'en' );
26 is_deeply( $u->available_translations, [] );
28 $u->i18n->signature( 'hello2' );
29 $u->save( );
30 is_deeply( $u->available_translations, [ 'ru' ] );
32 $u->delete( cascade => 1 );