File: 06_on_credential_load.t

package info (click to toggle)
libdbix-class-schema-config-perl 0.001011-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 240 kB
  • ctags: 126
  • sloc: perl: 2,019; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl
use warnings;
use strict;
use Test::More;
use lib 't/lib'; # Tests above t/
use lib 'lib';   # Tests inside t/
use DBIx::Class::Schema::Config::Plugin;
use Data::Dumper;

# Using a config file, with a plugin changing the DSN.
ok my $Schema = DBIx::Class::Schema::Config::Plugin->connect('PLUGIN', { dbname => ':memory:' }),
    "Connection to a plugin-modified schema works.";

my $expect = [
    {
        password => '', 
        user => '', 
        dsn => 'dbi:SQLite:dbname=:memory:'
    }
];

is_deeply $Schema->storage->connect_info, $expect, "Expected schema changes happened."; 

done_testing;