Tidy up Plugin::Auth section for current versions and best practices. Changelog
[catagits/Catalyst-Model-DBIC-Schema.git] / t / 09schema_options.t
CommitLineData
b9cc2f76 1use strict;
2use warnings;
3
4use FindBin '$Bin';
5use lib "$Bin/lib";
6
7use Test::More;
8use Test::Exception;
9use Catalyst::Model::DBIC::Schema;
10use ASchemaClass;
11
12plan tests => 4;
13
14ok((my $m = instance(a_schema_option => 'mtfnpy')), 'instance');
15
16is $m->schema->a_schema_option, 'mtfnpy', 'option was passed from config';
17
18lives_ok { $m->a_schema_option('pass the crack pipe') } 'delegate called';
19
20is $m->schema->a_schema_option, 'pass the crack pipe', 'delegation works';
21
22sub instance {
23 Catalyst::Model::DBIC::Schema->new({
24 schema_class => 'ASchemaClass',
25 connect_info => ['dbi:SQLite:foo.db', '', ''],
26 @_,
27 })
28}