Skip to content

Commit

Permalink
Fixed test for networks from default
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiejol committed Jun 2, 2017
1 parent f8911dd commit 9684b7a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions t/70_networks.t
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,13 @@ sub test_deny_all {

}

sub deny_everything_any {
my $sth = $test->dbh->prepare(
"UPDATE networks set all_domains=0 where address='0.0.0.0/0'"
);
$sth->execute;
}

########################################################################3
#
#
Expand All @@ -187,6 +194,7 @@ $domain->is_public(1);
my $net = Ravada::Network->new(address => '127.0.0.1/32');
ok($net->allowed($domain->id));

deny_everything_any();
my $net2 = Ravada::Network->new(address => '10.0.0.0/32');
ok(!$net2->allowed($domain->id), "Address unknown should not be allowed to anything");

Expand Down

0 comments on commit 9684b7a

Please sign in to comment.