Unverified Commit e32347a7 authored by Viral Solani's avatar Viral Solani Committed by GitHub

Merge pull request #104 from viralsolani/analysis-z37Bbr

Apply fixes from StyleCI
parents 1890b5bb e00d488d
......@@ -4,12 +4,12 @@ use App\Models\Page\Page;
use Faker\Generator as Faker;
$factory->define(Page::class, function (Faker $faker) {
$title = $faker->sentence;
return [
'title' => $title,
'page_slug' => str_slug($title),
'title' => $title,
'page_slug' => str_slug($title),
'description' => $faker->paragraph,
'created_by' => 1
'created_by' => 1,
];
});
......@@ -2,10 +2,8 @@
namespace Tests\Feature;
use Tests\TestCase;
use App\Models\Page\Page;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ManagePageTest extends TestCase
{
......@@ -81,7 +79,6 @@ class ManagePageTest extends TestCase
->actingAs($this->admin)
->post(route('admin.pages.store'), $page->toArray())
->assertSessionHasErrors('description');
}
/** @test */
......@@ -107,14 +104,14 @@ class ManagePageTest extends TestCase
$page1['title'] = '';
$page1['description'] = '';
$this->withExceptionHandling()
->actingAs($this->admin)
->post(route('admin.pages.store'), $page1)
->assertSessionHasErrors(['title', 'description']);
$page2['title'] = '';
$this->withExceptionHandling()
->actingAs($this->admin)
->post(route('admin.pages.store'), $page2)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment