refact App\User to App\Models\User

This commit is contained in:
2020-09-09 12:42:20 +02:00
parent 539637af40
commit 69f5dd9323
25 changed files with 68 additions and 68 deletions

View File

@@ -5,7 +5,7 @@ namespace Tests\Feature;
use App\Models\Event;
use App\Models\EventCategory;
use App\Models\Memo;
use App\User;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Symfony\Component\HttpFoundation\Response;
@@ -50,7 +50,7 @@ class EventsTest extends TestCase
/** @test */
public function event_category_name_are_required()
{
$this->actingAs($user = factory(\App\User::class)->create(['role' => 2]), 'api');
$this->actingAs($user = factory(\App\Models\User::class)->create(['role' => 2]), 'api');
$response = $this->post('/api/events/categories', ['name' => '', 'description' => 'test name required']);
$response->assertSessionHasErrors('name');
@@ -257,7 +257,7 @@ class EventsTest extends TestCase
/** @test */
public function event_name_are_required()
{
$this->actingAs($user = factory(\App\User::class)->create(), 'api');
$this->actingAs($user = factory(\App\Models\User::class)->create(), 'api');
$response = $this->post('/api/events', array_merge($this->data(), ['name' => '']));
$response->assertSessionHasErrors('name');
@@ -267,7 +267,7 @@ class EventsTest extends TestCase
/** @test */
public function event_start_date_are_required()
{
$this->actingAs($user = factory(\App\User::class)->create(), 'api');
$this->actingAs($user = factory(\App\Models\User::class)->create(), 'api');
$response = $this->post('/api/events', array_merge($this->data(), ['start_date' => '']));
$response->assertSessionHasErrors('start_date');