5 use Test
::More
'tests' => 2;
13 my $db = NewDB
->new();
21 content
=> 'blah-blah',
22 tags
=> [ { name
=> 'linux' }, { name
=> 'unix' }, { name
=> 'bsd' }, ]
27 content
=> 'blah-blah',
28 tags
=> [ { name
=> 'linux' }, { name
=> 'unix' }, ]
33 content
=> 'blah-blah',
34 tags
=> [ { name
=> 'linux' }, ]
38 foreach my $data ( @data ) {
39 my $tags = delete $data->{ tags
};
41 my $tag = Post
->new( %$data );
45 $tag->save( cascade
=> 1 );
48 my $tags = Tag
::Manager
->get_tags();
50 is
( scalar @
$tags, 3 );
52 $cloud = Tag
::Manager
->get_objects_cloud(
53 rel_name
=> 'post_tag_map',
54 active_column
=> 'name',
55 count_method
=> 'count'
83 my $posts = Post
::Manager
->get_objects();
84 $_->delete( cascade
=> 1 ) foreach @
$posts;