2016-05-17 01:39:44 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\functional;
|
|
|
|
|
|
|
|
use Codeception\Specify;
|
|
|
|
use tests\codeception\api\_pages\AccountsRoute;
|
|
|
|
use tests\codeception\api\FunctionalTester;
|
|
|
|
|
|
|
|
class AccountsChangeEmailSubmitNewEmailCest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var AccountsRoute
|
|
|
|
*/
|
|
|
|
private $route;
|
|
|
|
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
|
|
$this->route = new AccountsRoute($I);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testSubmitNewEmail(FunctionalTester $I) {
|
|
|
|
$I->wantTo('submit new email');
|
2017-01-24 04:30:08 +05:30
|
|
|
$I->amAuthenticated('ILLIMUNATI');
|
2016-05-17 01:39:44 +05:30
|
|
|
|
|
|
|
$this->route->changeEmailSubmitNewEmail('H27HBDCHHAG2HGHGHS', 'my-new-email@ely.by');
|
|
|
|
$I->canSeeResponseCodeIs(200);
|
|
|
|
$I->canSeeResponseIsJson();
|
|
|
|
$I->canSeeResponseContainsJson([
|
|
|
|
'success' => true,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|