1
0
mirror of https://github.com/flarum/core.git synced 2025-07-30 21:20:24 +02:00

Improve auth API tests

This commit is contained in:
Toby Zerner
2015-01-23 15:24:38 +10:30
parent 1f23cbaf20
commit b57a8d3bc2
3 changed files with 23 additions and 12 deletions

View File

@@ -12,9 +12,9 @@ class ApiHelper extends \Codeception\Module
return Factory::create('Flarum\Core\Users\User', $data);
}
public function login($identifier, $password)
public function login($identification, $password)
{
$this->getModule('REST')->sendPOST('/api/auth/login', ['identifier' => $identifier, 'password' => $password]);
$this->getModule('REST')->sendPOST('/api/auth/login', ['identification' => $identification, 'password' => $password]);
$response = json_decode($this->getModule('REST')->grabResponse(), true);
if ($response && is_array($response) && isset($response['token'])) {