refact App\User to App\Models\User
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\Bookmark;
|
||||
use App\User;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Tests\TestCase;
|
||||
@@ -17,7 +17,7 @@ class BookmarkTest extends TestCase
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
|
||||
$this->actingAs($user = factory(\App\User::class)->create(), 'api');
|
||||
$this->actingAs($user = factory(\App\Models\User::class)->create(), 'api');
|
||||
|
||||
$response = $this->post('/api/bookmarks', $this->data());
|
||||
|
||||
@@ -49,7 +49,7 @@ class BookmarkTest extends TestCase
|
||||
/** @test */
|
||||
public function bookmark_url_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/bookmarks', array_merge($this->data(), ['url' => '']));
|
||||
|
||||
$response->assertSessionHasErrors('url');
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Tests\Feature;
|
||||
|
||||
use App\Models\Image;
|
||||
use App\Models\Memo;
|
||||
use App\User;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Illuminate\Http\UploadedFile;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
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;
|
||||
@@ -28,7 +28,7 @@ class MemosTest extends TestCase
|
||||
{
|
||||
$this->withoutExceptionHandling();
|
||||
|
||||
$this->actingAs($user = factory(\App\User::class)->create(), 'api');
|
||||
$this->actingAs($user = factory(\App\Models\User::class)->create(), 'api');
|
||||
|
||||
$response = $this->post('/api/memos', $this->data());
|
||||
|
||||
@@ -52,7 +52,7 @@ class MemosTest extends TestCase
|
||||
/** @test */
|
||||
public function memo_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/memos', array_merge($this->data(), ['name' => '']));
|
||||
|
||||
$response->assertSessionHasErrors('name');
|
||||
@@ -62,7 +62,7 @@ class MemosTest extends TestCase
|
||||
/** @test */
|
||||
public function memo_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/memos', array_merge($this->data(), ['memo' => '']));
|
||||
|
||||
$response->assertSessionHasErrors('memo');
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Tests\Feature;
|
||||
|
||||
use App\Models\ToDo;
|
||||
use App\Models\ToDoList;
|
||||
use App\User;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Models\ToDoList;
|
||||
use App\User;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Tests\TestCase;
|
||||
@@ -44,7 +44,7 @@ class ToDoListsTest extends TestCase
|
||||
/** @test */
|
||||
public function to_do_list_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/to-do-lists/', ['name' => '']);
|
||||
|
||||
$response->assertSessionHasErrors('name');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\User;
|
||||
use App\Models\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\WithFaker;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
Reference in New Issue
Block a user