mirror of
https://github.com/elyby/accounts.git
synced 2024-11-20 04:03:12 +05:30
29 lines
667 B
PHP
29 lines
667 B
PHP
<?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) {
|
|
$I->loggedInAsActiveAccount('Veleyaba', 'password_0');
|
|
$this->route->acceptRules();
|
|
$I->canSeeResponseCodeIs(200);
|
|
$I->canSeeResponseIsJson();
|
|
$I->canSeeResponseContainsJson([
|
|
'success' => true,
|
|
]);
|
|
}
|
|
|
|
}
|