szurubooru/tests/Tests/JobTests/AcceptUserRegistrationJobTest.php
2014-05-13 21:16:28 +02:00

22 lines
497 B
PHP

<?php
class AcceptUserRegistrationJobTest extends AbstractTest
{
public function testConfirming()
{
$this->grantAccess('acceptUserRegistration');
$user = $this->userMocker->mockSingle();
$this->assert->isFalse($user->isStaffConfirmed());
$user = $this->assert->doesNotThrow(function() use ($user)
{
return Api::run(
new AcceptUserRegistrationJob(),
[
JobArgs::ARG_USER_NAME => $user->getName(),
]);
});
$this->assert->isTrue($user->isStaffConfirmed());
}
}