switch snippets across to object based
[catagits/catbook-code.git] / t / snippet_store / basic.t
index 5a46a3f..ada3887 100644 (file)
@@ -1,11 +1,18 @@
 use strict;
 use warnings;
 use Test::More qw(no_plan);
+use Test::Exception;
 
 use_ok "LolCatalyst::Lite::SnippetStore";
 
 my $store = LolCatalyst::Lite::SnippetStore->new;
 
+dies_ok {
+  $store->create({ text => "earth shattering kaboom" });
+} 'Create without translator object fails';
+
+$store = LolCatalyst::Lite::SnippetStore->new(translator => 'DUMMY');
+
 my $num_snips = 3;
 
 ok(