1use v5.10.0;
2use strict;
3use warnings;
4use Test::More tests => 4;
5use Hailo::Storage;
6use Hailo::Storage::SQLite;
7use Hailo::Storage::MySQL;
8use Hailo::Storage::PostgreSQL;
9
10my $sql    = Hailo::Storage->new;
11my $pg     = Hailo::Storage::PostgreSQL->new;
12my $sqlite = Hailo::Storage::SQLite->new;
13my $mysql  = Hailo::Storage::MySQL->new;
14
15# SQL
16is_deeply(
17    $sql->dbd_options,
18    {
19        RaiseError => 1,
20    },
21    "Storage options"
22);
23
24# Pg
25is_deeply(
26    $pg->dbd_options,
27    {
28        pg_enable_utf8 => 1,
29        RaiseError => 1,
30    },
31    "PostgreSQL options"
32);
33
34# SQLite
35is_deeply(
36    $sqlite->dbd_options,
37    {
38        sqlite_unicode => 1,
39        RaiseError => 1,
40    },
41    "SQLite options"
42);
43
44# mysql
45is_deeply(
46    $mysql->dbd_options,
47    {
48        mysql_enable_utf8 => 1,
49        RaiseError => 1,
50    },
51    "MySQL options"
52);
53