3 use Test::More qw(no_plan);
6 use_ok "LolCatalyst::Lite::SnippetStore";
9 LolCatalyst::Lite::SnippetStore->new;
10 } 'Create without translator object fails';
12 my $store = LolCatalyst::Lite::SnippetStore->new(translator => 'DUMMY');
17 (my @snip = map $store->create({ text => "snippet $_" }), 1 .. $num_snips),
21 cmp_ok(scalar(@snip), '==', $num_snips, "$num_snips created");
23 is_deeply(\@snip, [ $store->all ], 'deep snippet check');
25 foreach my $snip (@snip) {
27 is($snip->{text}, $store->find($id)->{text}, "find by id $id ok");