Skip to content

Commit

Permalink
fix test-case with SOA records for sub-domains
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Sep 22, 2022
1 parent 993db92 commit 32d2539
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Rules/DnsRecordExists.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ public function passes($attribute, $value): bool
return collect($this->expectations)
->every(
fn (Closure $expectation, int | string $type): bool => $this->dns->records($domain, $type)
->filter($expectation)
->isNotEmpty()
->filter($expectation)
->isNotEmpty()
);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/DnsRecordExistsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
)->toBeTrue();
});

it('fails when no record exists', function () {
it('fails when domain does not exist', function () {
expect(
DnsRecordExists::make()
->passes('', 'foo.astrotomic.info')
->passes('', 'foo.astrotomic')
)->toBeFalse();
});

Expand Down

0 comments on commit 32d2539

Please sign in to comment.