mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-27 04:32:14 +00:00
Fixed image tests after amends to url system
This commit is contained in:
parent
0f2eaccb39
commit
2af0021c2b
@ -57,10 +57,12 @@ class ImageTest extends TestCase
|
|||||||
$relPath = $this->uploadImage($imageName, $page->id);
|
$relPath = $this->uploadImage($imageName, $page->id);
|
||||||
$this->assertResponseOk();
|
$this->assertResponseOk();
|
||||||
|
|
||||||
$this->assertTrue(file_exists(public_path($relPath)), 'Uploaded image exists');
|
$this->assertTrue(file_exists(public_path($relPath)), 'Uploaded image not found at path: '. public_path($relPath));
|
||||||
|
|
||||||
|
$this->deleteImage($relPath);
|
||||||
|
|
||||||
$this->seeInDatabase('images', [
|
$this->seeInDatabase('images', [
|
||||||
'url' => $relPath,
|
'url' => url($relPath),
|
||||||
'type' => 'gallery',
|
'type' => 'gallery',
|
||||||
'uploaded_to' => $page->id,
|
'uploaded_to' => $page->id,
|
||||||
'path' => $relPath,
|
'path' => $relPath,
|
||||||
@ -69,7 +71,6 @@ class ImageTest extends TestCase
|
|||||||
'name' => $imageName
|
'name' => $imageName
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->deleteImage($relPath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function test_image_delete()
|
public function test_image_delete()
|
||||||
|
Loading…
Reference in New Issue
Block a user