3 $SIG{__DIE__} = \&Carp::confess;
7 my $c = SGN::Context->new;
11 can_ok( $c->dbc, 'dbh', 'run','txn' );
12 can_ok( $c->dbc->dbh, 'selectall_arrayref', 'prepare', 'ping' );
14 ok( $c->dbc->dbh->ping, 'dbh looks live' );
17 $c->dbc('nonexistent connection profile');
18 } qr/not defined/, 'throws for nonexistent connection profile';
20 like( $c->dbc->dbh->{private_search_path_string},
22 'private_search_path has something in it',
25 # test dbic_schema method
27 my $schema = $c->dbic_schema('Test::Schema');
28 can_ok( $schema, 'resultset', 'storage' );
29 ok( $schema->storage->dbh->ping, 'dbic storage is connected' );
30 is( search_path( $schema->storage->dbh), search_path( $c->dbc->dbh ), 'schema and dbc should have same search path' );
33 can_ok( $c->new_jsan, 'uris' );
34 my $uris = $c->js_import_uris('CXGN.Page.Toolbar');
35 cmp_ok( scalar(@$uris), '>=', 1, 'got at least 1 URI to include for CXGN.Page.Toolbar' );
42 my ($sp) = $dbh->selectrow_array('show search_path');
48 use base 'DBIx::Class::Schema';