File: 02-connect.t

package info (click to toggle)
libcatmandu-store-mongodb-perl 0.0802-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 188 kB
  • sloc: perl: 699; sh: 4; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 446 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env perl

use strict;
use warnings;
use Test::More;
use Test::Exception;

my @pkgs = qw(
    Catmandu::Store::MongoDB
    Catmandu::Store::MongoDB::Bag
    Catmandu::Store::MongoDB::Searcher
);

require_ok $_ for @pkgs;

# Connect to a non-existing host
my $store = Catmandu->store(
    'MongoDB',
    database_name => 'test',
    host          => 'mongodb://localhost:0'
);

dies_ok {$store->first} 'expecting to die';

done_testing;