From: Dan Brown Date: Sun, 30 Oct 2016 12:58:01 +0000 (+0000) Subject: Fixed image tests after amends to url system X-Git-Tag: v0.12.2~1^2 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/2af0021c2bda81d72bff13d4516b0de6d75a6c11?hp=--cc Fixed image tests after amends to url system --- 2af0021c2bda81d72bff13d4516b0de6d75a6c11 diff --git a/tests/ImageTest.php b/tests/ImageTest.php index 806a36acc..23373419f 100644 --- a/tests/ImageTest.php +++ b/tests/ImageTest.php @@ -57,10 +57,12 @@ class ImageTest extends TestCase $relPath = $this->uploadImage($imageName, $page->id); $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', [ - 'url' => $relPath, + 'url' => url($relPath), 'type' => 'gallery', 'uploaded_to' => $page->id, 'path' => $relPath, @@ -68,8 +70,7 @@ class ImageTest extends TestCase 'updated_by' => $admin->id, 'name' => $imageName ]); - - $this->deleteImage($relPath); + } public function test_image_delete()