allow test to run without a db

This commit is contained in:
Oliver Gorwits
2018-01-06 13:37:54 +00:00
parent b49d5aeb86
commit 8260544cb7

View File

@@ -7,6 +7,7 @@ use Test::File::ShareDir::Dist { 'App-Netdisco' => 'share/' };
use lib 'xt/lib';
use App::Netdisco;
use App::Netdisco::DB; # fake device row
use App::Netdisco::Backend::Job;
use Try::Tiny;
@@ -101,7 +102,7 @@ sub do_job {
my $job = App::Netdisco::Backend::Job->new({
job => 0,
device => '192.0.2.1',
device => App::Netdisco::DB->resultset('Device')->new_result({ip => '192.0.2.1'}),
action => lc($pkg),
});