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