1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00
invoiceninja/tests/Feature/ClientTest.php

59 lines
1.3 KiB
PHP
Raw Normal View History

2019-03-26 06:00:15 +01:00
<?php
namespace Tests\Feature;
use App\Jobs\Account\CreateAccount;
use App\Models\Account;
use App\Models\Client;
use App\Models\User;
use App\Utils\Traits\UserSessionAttributes;
use Faker\Factory;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use Tests\TestCase;
class ClientTest extends TestCase
{
use DatabaseTransactions;
public function setUp()
{
parent::setUp();
Session::start();
$faker = \Faker\Factory::create();
2019-03-26 12:31:07 +01:00
$this->data = [
2019-03-26 06:00:15 +01:00
'first_name' => $faker->firstName,
'last_name' => $faker->lastName,
'email' => $faker->unique()->safeEmail,
2019-03-26 12:31:07 +01:00
'password' => 'ALongAndBrilliantPassword123',
'_token' => csrf_token()
2019-03-26 06:00:15 +01:00
];
2019-03-26 12:31:07 +01:00
// $this->user = CreateAccount::dispatchNow($data);
2019-03-26 06:00:15 +01:00
}
2019-03-26 12:31:07 +01:00
public function testAccountCreation()
{
$response = $this->post('/signup', $this->data);
$this->assertEquals($response->json(), 'yadda');
//$response->assertSuccessful();
//$response->assertStatus(200);
}
2019-03-26 06:00:15 +01:00
public function testUserCreated()
{
2019-03-26 12:31:07 +01:00
$this->assertTrue(true);
2019-03-26 06:00:15 +01:00
}
}