Test that email is trimmed

This commit is contained in:
Thomas Portelange 2021-03-22 09:03:43 +01:00 committed by GitHub
parent 22b2d58b5a
commit fc40e0b98a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1593,4 +1593,12 @@ class MemberTest extends FunctionalTest
$this->assertSame('Johnson', $member->getLastName(), 'getLastName should proxy to Surname'); $this->assertSame('Johnson', $member->getLastName(), 'getLastName should proxy to Surname');
} }
public function testEmailIsTrimmed()
{
$member = new Member();
$member->Email = " trimmed@test.com\r\n";
$member->write();
$this->assertNotNull(Member::get()->find('Email', 'trimmed@test.com'));
}
} }