mirror of
https://github.com/elyby/accounts.git
synced 2024-12-24 22:29:51 +05:30
Fixes ACCOUNTS-34Y
После перехода на utf8mb4_unicode_ci забыли обновить кодировку подключения к БД
This commit is contained in:
parent
3f5b34fc1f
commit
01850bb2d6
@ -12,7 +12,7 @@ return [
|
|||||||
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
||||||
'username' => getenv('DB_USER'),
|
'username' => getenv('DB_USER'),
|
||||||
'password' => getenv('DB_PASSWORD'),
|
'password' => getenv('DB_PASSWORD'),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8mb4',
|
||||||
'schemaMap' => [
|
'schemaMap' => [
|
||||||
'mysql' => common\db\mysql\Schema::class,
|
'mysql' => common\db\mysql\Schema::class,
|
||||||
],
|
],
|
||||||
@ -22,7 +22,7 @@ return [
|
|||||||
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
'dsn' => 'mysql:host=' . (getenv('DB_HOST') ?: 'db') . ';dbname=' . getenv('DB_DATABASE'),
|
||||||
'username' => getenv('DB_USER'),
|
'username' => getenv('DB_USER'),
|
||||||
'password' => getenv('DB_PASSWORD'),
|
'password' => getenv('DB_PASSWORD'),
|
||||||
'charset' => 'utf8',
|
'charset' => 'utf8mb4',
|
||||||
'attributes' => [
|
'attributes' => [
|
||||||
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
|
PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => false,
|
||||||
],
|
],
|
||||||
|
@ -5,7 +5,19 @@ use tests\codeception\api\_pages\SignupRoute;
|
|||||||
|
|
||||||
class EmailConfirmationCest {
|
class EmailConfirmationCest {
|
||||||
|
|
||||||
public function testLoginEmailOrUsername(FunctionalTester $I) {
|
public function testConfirmEmailByCorrectKey(FunctionalTester $I) {
|
||||||
|
$route = new SignupRoute($I);
|
||||||
|
|
||||||
|
$I->wantTo('confirm my email using correct activation key');
|
||||||
|
$route->confirm('HABGCABHJ1234HBHVD');
|
||||||
|
$I->canSeeResponseContainsJson([
|
||||||
|
'success' => true,
|
||||||
|
]);
|
||||||
|
$I->cantSeeResponseJsonMatchesJsonPath('$.errors');
|
||||||
|
$I->canSeeAuthCredentials(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testConfirmEmailByInvalidKey(FunctionalTester $I) {
|
||||||
$route = new SignupRoute($I);
|
$route = new SignupRoute($I);
|
||||||
|
|
||||||
$I->wantTo('see error.key_is_required expected if key is not set');
|
$I->wantTo('see error.key_is_required expected if key is not set');
|
||||||
@ -27,16 +39,22 @@ class EmailConfirmationCest {
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testLoginByEmailCorrect(FunctionalTester $I) {
|
public function testConfirmByInvalidEmojiString(FunctionalTester $I) {
|
||||||
$route = new SignupRoute($I);
|
$route = new SignupRoute($I);
|
||||||
|
|
||||||
$I->wantTo('confirm my email using correct activation key');
|
$I->wantTo('try to submit some long emoji string (Sentry ACCOUNTS-43Y)');
|
||||||
$route->confirm('HABGCABHJ1234HBHVD');
|
$route->confirm(
|
||||||
|
'ALWAYS 🕔 make sure 👍 to shave 🔪🍑 because ✌️ the last time 🕒 we let 👐😪 a bush 🌳 ' .
|
||||||
|
'in our lives 👈😜👉 it did 9/11 💥🏢🏢✈️🔥🔥🔥 ALWAYS 🕔 make sure 👍 to shave 🔪🍑 ' .
|
||||||
|
'because ✌️ the last time 🕒 we let 👐😪 a bush 🌳 in our lives 👈😜👉 it did 9/11 ' .
|
||||||
|
'💥🏢🏢✈️🔥🔥🔥/'
|
||||||
|
);
|
||||||
$I->canSeeResponseContainsJson([
|
$I->canSeeResponseContainsJson([
|
||||||
'success' => true,
|
'success' => false,
|
||||||
|
'errors' => [
|
||||||
|
'key' => 'error.key_not_exists',
|
||||||
|
],
|
||||||
]);
|
]);
|
||||||
$I->cantSeeResponseJsonMatchesJsonPath('$.errors');
|
|
||||||
$I->canSeeAuthCredentials(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user