More test suite coverage

This commit is contained in:
Dane Everitt 2017-09-26 22:16:26 -05:00
parent 8908a758ca
commit 774c9680a3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
14 changed files with 373 additions and 46 deletions

View file

@ -94,7 +94,7 @@ class UserCreationServiceTest extends TestCase
$this->hasher->shouldReceive('make')->with('raw-password')->once()->andReturn('enc-password');
$this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
$this->hasher->shouldNotReceive('make');
$this->passwordService->shouldNotReceive('generateReset');
$this->passwordService->shouldNotReceive('handle');
$this->repository->shouldReceive('create')->with(['password' => 'enc-password'])->once()->andReturn($user);
$this->database->shouldReceive('commit')->withNoArgs()->once()->andReturnNull();
$this->appMock->shouldReceive('makeWith')->with(AccountCreated::class, [
@ -130,7 +130,7 @@ class UserCreationServiceTest extends TestCase
$this->hasher->shouldNotReceive('make');
$this->database->shouldReceive('beginTransaction')->withNoArgs()->once()->andReturnNull();
$this->hasher->shouldReceive('make')->once()->andReturn('created-enc-password');
$this->passwordService->shouldReceive('generateReset')
$this->passwordService->shouldReceive('handle')
->with('user@example.com')
->once()
->andReturn('random-token');