diff --git a/app/Support/Migration/TestData.php b/app/Support/Migration/TestData.php index 97c46c98d0..12a45be67a 100644 --- a/app/Support/Migration/TestData.php +++ b/app/Support/Migration/TestData.php @@ -115,7 +115,7 @@ class TestData 'title' => Crypt::encrypt($attachment['title']), 'description' => Crypt::encrypt($attachment['description']), 'notes' => Crypt::encrypt($attachment['notes']), - 'mime' => $attachment['mime'], + 'mime' => Crypt::encrypt($attachment['mime']), 'size' => strlen($attachment['content']), 'uploaded' => 1, ] diff --git a/tests/acceptance/Controllers/AttachmentControllerTest.php b/tests/acceptance/Controllers/AttachmentControllerTest.php index 293b1d911b..6f96cf8db5 100644 --- a/tests/acceptance/Controllers/AttachmentControllerTest.php +++ b/tests/acceptance/Controllers/AttachmentControllerTest.php @@ -8,6 +8,7 @@ * * See the LICENSE file for details. */ +use FireflyIII\Repositories\Attachment\AttachmentRepositoryInterface; /** @@ -28,81 +29,88 @@ class AttachmentControllerTest extends TestCase /** * @covers \FireflyIII\Http\Controllers\AttachmentController::delete - * Implement testDelete(). */ public function testDelete() { - // Remove the following lines when you implement this test. - $this->markTestIncomplete( - 'This test has not been implemented yet.' - ); + $this->be($this->user()); + $this->call('GET', route('attachments.delete', [1])); + $this->assertResponseStatus(200); + // has bread crumb + $this->see('