2016-08-06 21:52:09 +05:30
|
|
|
<?php
|
|
|
|
namespace tests\codeception\api\functional;
|
|
|
|
|
|
|
|
use tests\codeception\api\_pages\AccountsRoute;
|
|
|
|
use tests\codeception\api\FunctionalTester;
|
|
|
|
|
|
|
|
class AccountsAcceptRulesCest {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var AccountsRoute
|
|
|
|
*/
|
|
|
|
private $route;
|
|
|
|
|
|
|
|
public function _before(FunctionalTester $I) {
|
|
|
|
$this->route = new AccountsRoute($I);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testCurrent(FunctionalTester $I) {
|
2017-01-24 04:30:08 +05:30
|
|
|
$I->amAuthenticated('Veleyaba');
|
2016-08-06 21:52:09 +05:30
|
|
|
$this->route->acceptRules();
|
|
|
|
$I->canSeeResponseCodeIs(200);
|
|
|
|
$I->canSeeResponseIsJson();
|
|
|
|
$I->canSeeResponseContainsJson([
|
|
|
|
'success' => true,
|
|
|
|
]);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|