2016-05-17 01:39:44 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\functional;
|
|
|
|
|
|
|
|
use tests\codeception\api\_pages\AccountsRoute;
|
|
|
|
use tests\codeception\api\FunctionalTester;
|
|
|
|
|
|
|
|
class AccountsChangeEmailConfirmNewEmailCest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var AccountsRoute
|
|
|
|
*/
|
|
|
|
private $route;
|
|
|
|
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
|
|
$this->route = new AccountsRoute($I);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testConfirmNewEmail(FunctionalTester $I) {
|
|
|
|
$I->wantTo('change my email and get changed value');
|
2017-01-24 04:30:08 +05:30
|
|
|
$I->amAuthenticated('CrafterGameplays');
|
2016-05-17 01:39:44 +05:30
|
|
|
|
2017-09-19 22:36:16 +05:30
|
|
|
$this->route->changeEmail(8, 'H28HBDCHHAG2HGHGHS');
|
2016-05-17 01:39:44 +05:30
|
|
|
$I->canSeeResponseCodeIs(200);
|
|
|
|
$I->canSeeResponseIsJson();
|
|
|
|
$I->canSeeResponseContainsJson([
|
|
|
|
'success' => true,
|
|
|
|
'data' => [
|
|
|
|
'email' => 'my-new-email@ely.by',
|
|
|
|
],
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|