Page MenuHomePhorge

D2686.1775169711.diff
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

D2686.1775169711.diff

diff --git a/src/tests/Feature/Stories/GreylistTest.php b/src/tests/Feature/Stories/GreylistTest.php
--- a/src/tests/Feature/Stories/GreylistTest.php
+++ b/src/tests/Feature/Stories/GreylistTest.php
@@ -458,6 +458,19 @@
);
$this->assertFalse($request->shouldDefer());
+
+
+ // Ensure we also find the setting by alias
+ $aliases = $this->domainOwner->aliases()->orderBy('alias')->get();
+ $request = new Greylist\Request(
+ [
+ 'sender' => 'someone@sender.domain',
+ 'recipient' => $aliases[0]->alias,
+ 'client_address' => $this->clientAddress
+ ]
+ );
+
+ $this->assertFalse($request->shouldDefer());
}
public function testUserEnabled()
diff --git a/src/tests/TestCaseTrait.php b/src/tests/TestCaseTrait.php
--- a/src/tests/TestCaseTrait.php
+++ b/src/tests/TestCaseTrait.php
@@ -389,11 +389,20 @@
]
);
+ $this->getTestDomain(
+ 'test2.domain2',
+ [
+ 'type' => \App\Domain::TYPE_EXTERNAL,
+ 'status' => \App\Domain::STATUS_ACTIVE | \App\Domain::STATUS_CONFIRMED | \App\Domain::STATUS_VERIFIED
+ ]
+ );
+
$packageKolab = \App\Package::where('title', 'kolab')->first();
$this->domainOwner = $this->getTestUser('john@test.domain', ['password' => $this->userPassword]);
$this->domainOwner->assignPackage($packageKolab);
$this->domainOwner->setSettings($this->domainOwnerSettings);
+ $this->domainOwner->setAliases(['alias1@test2.domain2']);
// separate for regular user
$this->jack = $this->getTestUser('jack@test.domain', ['password' => $this->userPassword]);

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 2, 10:41 PM (1 d, 6 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18802380
Default Alt Text
D2686.1775169711.diff (1 KB)

Event Timeline