Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Update attachment controller test.
James Coleac63a082aaf4
diff --git a/tests/Feature/Controllers/AttachmentControllerTest.php b/tests/Feature/Controllers/AttachmentControllerTest.phpindex b7d84ad060..39f8cab2b6 100644--- a/tests/Feature/Controllers/AttachmentControllerTest.php+++ b/tests/Feature/Controllers/AttachmentControllerTest.php@@ -23,10 +23,10 @@ class AttachmentControllerTest extends TestCasepublic function testDelete(){$this->be($this->user());- $this->call('GET', route('attachments.delete', [1]));- $this->assertResponseStatus(200);+ $response = $this->get(route('attachments.delete', [1]));+ $response->assertStatus(200);// has bread crumb- $this->see('<ol class="breadcrumb">');+ $response->assertSee('<ol class="breadcrumb">');}/**@@ -39,9 +39,9 @@ class AttachmentControllerTest extends TestCase$repository = $this->mock(AttachmentRepositoryInterface::class);$repository->shouldReceive('destroy')->andReturn(true);$this->be($this->user());- $this->call('post', route('attachments.destroy', [1]));- $this->assertResponseStatus(302);- $this->assertSessionHas('success');+ $response = $this->post(route('attachments.destroy', [1]));+ $response->assertStatus(302);+ $response->assertSessionHas('success');}/**@@ -54,10 +54,10 @@ class AttachmentControllerTest extends TestCase$repository->shouldReceive('getContent')->once()->andReturn('This is attachment number one.');$this->be($this->user());- $this->call('GET', route('attachments.download', [1]));- $this->assertResponseStatus(200);+ $response = $this->get(route('attachments.download', [1]));+ $response->assertStatus(200);// has bread crumb- $this->see('This is attachment number one.');+ $response->assertSee('This is attachment number one.');}/**@@ -66,10 +66,10 @@ class AttachmentControllerTest extends TestCasepublic function testEdit(){$this->be($this->user());- $this->call('GET', route('attachments.edit', [1]));- $this->assertResponseStatus(200);+ $response = $this->get(route('attachments.edit', [1]));+ $response->assertStatus(200);// has bread crumb- $this->see('<ol class="breadcrumb">');+ $response->assertSee('<ol class="breadcrumb">');}/**@@ -78,8 +78,8 @@ class AttachmentControllerTest extends TestCasepublic function testPreview(){$this->be($this->user());- $this->call('GET', route('attachments.preview', [1]));- $this->assertResponseStatus(200);+ $response = $this->get(route('attachments.preview', [1]));+ $response->assertStatus(200);}/**@@ -95,17 +95,17 @@ class AttachmentControllerTest extends TestCase];$this->be($this->user());- $this->call('post', route('attachments.update', [1]), $data);- $this->assertResponseStatus(302);- $this->assertSessionHas('success');+ $response = $this->post(route('attachments.update', [1]), $data);+ $response->assertStatus(302);+ $response->assertSessionHas('success');// view should be updated$this->be($this->user());- $this->call('GET', route('attachments.edit', [1]));- $this->assertResponseStatus(200);+ $response = $this->get(route('attachments.edit', [1]));+ $response->assertStatus(200);// has bread crumb- $this->see('<ol class="breadcrumb">');- $this->see($data['title']);+ $response->assertSee('<ol class="breadcrumb">');+ $response->assertSee($data['title']);}