working on client test

This commit is contained in:
David Bomba 2019-03-26 22:31:07 +11:00
parent 6272fb36fc
commit 7defe077bc
2 changed files with 15 additions and 10 deletions

View File

@ -52,7 +52,7 @@ class LoginController extends Controller
*/
public function authenticated(Request $request, User $user) : void
{
$this->setCurrentCompanyId($user->companies()->first()->account->default_company_id);
//$this->setCurrentCompanyId($user->companies()->first()->account->default_company_id);
}
/**

View File

@ -27,25 +27,30 @@ class ClientTest extends TestCase
$faker = \Faker\Factory::create();
$data = [
$this->data = [
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
'email' => $faker->unique()->safeEmail,
'password' => 'ALongAndBrilliantPassword123'
'password' => 'ALongAndBrilliantPassword123',
'_token' => csrf_token()
];
$this->user = CreateAccount::dispatchNow($data);
// $this->user = CreateAccount::dispatchNow($data);
}
public function testAccountCreation()
{
$response = $this->post('/signup', $this->data);
$this->assertEquals($response->json(), 'yadda');
//$response->assertSuccessful();
//$response->assertStatus(200);
}
/**
* A valid user can be logged in.
*
* @return void
*/
public function testUserCreated()
{
$this->assertTrue($user);
$this->assertTrue(true);
}