Dont' commit when nothing was changed.
[blog.pm-common-perl-mods.git] / Rose-DB-Object-I18N / t / insert.t
blob5e03d208a84ff9c7ba803902e6ed52d01cea7a52
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 => 'foo',
20 orig_lang => 'en'
23 is( $u->name, 'foo' );
24 is( $u->orig_lang, 'en' );
26 $u->user_i18n( { signature => 'hello' } );
27 is( scalar @{ $u->user_i18n }, 1 );
29 $u->save();
31 is( scalar @{ $u->user_i18n }, 3 );
33 $u->delete( cascade => 1 );