Fix local maildispatcher casing
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
71e6b0216f
commit
59920bac1d
|
@ -8,5 +8,6 @@ class MailEntry extends Data
|
||||||
{
|
{
|
||||||
public function __construct(public string $email)
|
public function __construct(public string $email)
|
||||||
{
|
{
|
||||||
|
$this->email = strtolower($email);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace Tests\Feature\Maildispatcher;
|
namespace Tests\Feature\Maildispatcher;
|
||||||
|
|
||||||
use App\Activity;
|
use App\Activity;
|
||||||
|
use App\Maildispatcher\Models\Localmaildispatcher;
|
||||||
use App\Maildispatcher\Models\Maildispatcher;
|
use App\Maildispatcher\Models\Maildispatcher;
|
||||||
use App\Mailgateway\Models\Mailgateway;
|
use App\Mailgateway\Models\Mailgateway;
|
||||||
use App\Mailgateway\Types\LocalType;
|
use App\Mailgateway\Types\LocalType;
|
||||||
|
@ -48,4 +49,18 @@ class StoreTest extends TestCase
|
||||||
'to' => 'jane@example.com',
|
'to' => 'jane@example.com',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testMaildispatcherReceivesLowerVersionOfEmail(): void
|
||||||
|
{
|
||||||
|
$gateway = Mailgateway::factory()->type(LocalType::class, [])->create();
|
||||||
|
Member::factory()->defaults()->create(['email' => 'Jane@example.com']);
|
||||||
|
|
||||||
|
$this->postJson('/maildispatcher', [
|
||||||
|
'name' => 'test',
|
||||||
|
'gateway_id' => $gateway->id,
|
||||||
|
'filter' => [],
|
||||||
|
]);
|
||||||
|
|
||||||
|
$this->assertEquals('jane@example.com', Localmaildispatcher::first()->to);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue