Ejemplo n.º 1
0
 /** @test */
 public function it_stores_company_representative_user()
 {
     $userRepository = new DbUserRepository();
     $user = factory(User::class)->make(['password' => 'pass']);
     $this->assertNotFalse($user = $userRepository->storeCompanyRepresentativeAccount(['email' => $user->email, 'name' => $user->name, 'password' => 'pass']));
     $this->seeInDatabase('users', ['email' => $user->email, 'name' => $user->name]);
     $this->assertTrue(Hash::check('pass', $user->password));
     $this->assertTrue($userRepository->hasCompanyRepresentativeRole($user));
 }