Move a number of tests to xt, restructure extra lists
[dbsrgits/DBIx-Class.git] / xt / extra / diagnostics / search_in_void_ctx.t
diff --git a/xt/extra/diagnostics/search_in_void_ctx.t b/xt/extra/diagnostics/search_in_void_ctx.t
new file mode 100644 (file)
index 0000000..95a040f
--- /dev/null
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use Test::More;
+use Test::Exception;
+
+use lib qw(t/lib);
+use DBICTest;
+
+my $schema = DBICTest->init_schema(no_deploy => 1);
+
+throws_ok {
+  $schema->resultset('Artist')->search
+} qr/\Qsearch is *not* a mutator/, 'Proper exception on search in void ctx';
+
+done_testing;