fix test update news with picture
This commit is contained in:
parent
18df25c6a8
commit
7206bab9c2
|
@ -79,9 +79,10 @@ class NewsTest extends TestCase
|
||||||
|
|
||||||
public function testUpdateNews(): void
|
public function testUpdateNews(): void
|
||||||
{
|
{
|
||||||
|
$file = UploadedFile::fake()->create('fake.jpg', 100);
|
||||||
$response = $this->actingAs($this->user)
|
$response = $this->actingAs($this->user)
|
||||||
->withSession(['banned' => false])
|
->withSession(['banned' => false])
|
||||||
->patch(route('news.update', $this->news), $this->data);
|
->patch(route('news.update', $this->news), [...$this->data, 'photo' => $file]);
|
||||||
|
|
||||||
$response->assertRedirect(route('news.index'));
|
$response->assertRedirect(route('news.index'));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue